staging: greybus: remove timesync protocol support
While the timesync protocol was a great idea, it never ended up getting
implemented by any known hardware devices. It's also a bit
"interesting" in how it ties into the platform controller.
So, just remove it for now. It's not needed, no one uses it, and it's a
stumbling block in getting the greybus core code merged out of the
staging tree. If anyone wants it in the future, reverting this patch is
a great place to start from.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Johan Hovold <johan@kernel.org> Reviewed-by: Alex Elder <elder@kernel.org> Acked-by: Bryan O'Donoghue <pure.logic@nexus-software.ie> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
It's now 2017, and a new LTS kernel has been chosen, so let's do what we
said we would do in the TODO file and delete this code. If it's still
needed, and a maintainer steps up to take it over, we will easily revert
it.
Eric S. Stone [Thu, 5 Jan 2017 08:22:15 +0000 (00:22 -0800)]
staging: gdm724x: update HCI structs with new bitwise types
Update the driver's HCI structs and associated endian-converter
functions with new driver-specific bitwise types. The new types
encourage correct endian-handling within the driver by triggering
sparse warnings when mixing with other types. The driver's
endian-converters provide correct and warning-free conversions.
Driver-specific bitwise types are used instead of the standard
endian-specific types because the attached device can be of either
endian. This is also why the driver has its own endian-conversion
functions, which consider endianness of both the cpu and the attached
device.
Introducing the new types to the converters fixes the sparse warnings:
CHECK drivers/staging/gdm724x/gdm_endian.c
drivers/staging/gdm724x/gdm_endian.c:28:24: warning: incorrect type in return expression (different base types)
drivers/staging/gdm724x/gdm_endian.c:28:24: expected unsigned short
drivers/staging/gdm724x/gdm_endian.c:28:24: got restricted __le16 [usertype] <noident>
drivers/staging/gdm724x/gdm_endian.c:30:24: warning: incorrect type in return expression (different base types)
drivers/staging/gdm724x/gdm_endian.c:30:24: expected unsigned short
drivers/staging/gdm724x/gdm_endian.c:30:24: got restricted __be16 [usertype] <noident>
drivers/staging/gdm724x/gdm_endian.c:36:24: warning: cast to restricted __le16
drivers/staging/gdm724x/gdm_endian.c:38:24: warning: cast to restricted __be16
drivers/staging/gdm724x/gdm_endian.c:44:24: warning: incorrect type in return expression (different base types)
drivers/staging/gdm724x/gdm_endian.c:44:24: expected unsigned int
drivers/staging/gdm724x/gdm_endian.c:44:24: got restricted __le32 [usertype] <noident>
drivers/staging/gdm724x/gdm_endian.c:46:24: warning: incorrect type in return expression (different base types)
drivers/staging/gdm724x/gdm_endian.c:46:24: expected unsigned int
drivers/staging/gdm724x/gdm_endian.c:46:24: got restricted __be32 [usertype] <noident>
drivers/staging/gdm724x/gdm_endian.c:52:24: warning: cast to restricted __le32
drivers/staging/gdm724x/gdm_endian.c:54:24: warning: cast to restricted __be32
Signed-off-by: Eric S. Stone <esstone@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Wed, 4 Jan 2017 10:22:18 +0000 (17:22 +0700)]
staging:r8188eu: remove unused WIFI_MP_*STATE and WIFI_MP_CTX* definitions
fw_state member of struct mlme_priv never obtain WIFI_MP_STATE value,
so code only for (fw_state == WIFI_MP_STATE) is dead.
Remove it, WIFI_MP_*STATE and WIFI_MP_CTX* definitions.
Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Tue, 3 Jan 2017 21:01:15 +0000 (16:01 -0500)]
staging: unisys: visorbus: visorchipset.c: Don't check for more than PAGE_SIZE length
Since a sysfs entry is allocated 1 page of memory (4096 bytes) by default,
there is no need to enforce this limit in the driver. This patch corrects
visorbus/visorchipset.c.
Signed-off-by: David Binder <david.binder@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Tue, 3 Jan 2017 21:01:16 +0000 (16:01 -0500)]
staging: unisys: visorbus: Don't check for more than PAGE_SIZE length in visorbus
Since a sysfs entry is allocated 1 page of memory (4096 bytes) by default,
there is no need to enforce this limit in the driver. This patch corrects
visorbus/visorbus_main.c.
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David Binder <david.binder@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Galo Navarro [Tue, 3 Jan 2017 22:12:09 +0000 (23:12 +0100)]
staging: rtl8188eu: fix incorrect ERROR tags from logs
Several lifecycle events in the rtl8188eu driver are logged using the
DBG_88E_LEVEL macro from rtw_debug.h, which is tagged as ERROR
regardless of the actual level. Below are dmesg excerpts after loading
and unloading the module, the messages are misleading as there was no
error.
Ramiro Oliveira [Tue, 3 Jan 2017 14:43:40 +0000 (14:43 +0000)]
staging: most: change dma_buf variable to __le16
dma_buf is being cast to __le16 *, but it was defined as u16 *.
sparse reported this error as:
drivers/staging/most/hdm-usb/hdm_usb.c:158:16: warning: cast to restricted
__le16
staging: greybus: log: Fix line over 80 characters.
Fix coding style issue caught by checkpatch.pl related to the following
warning:
- CHECK: WARNING: line over 80 characters
This is done by dropping a redundant cast and by replacing the format specifier
in dev_err(); to "%zu" instead of "%d", in order to silence the warnings of the
compiler.
Also, while at it, drop the redundant cast in the comparison as well to maintain
consistency.
Luca Ceresoli [Thu, 29 Dec 2016 23:01:06 +0000 (00:01 +0100)]
staging: rtl8188eu: remove unused members from struct recv_priv
Since commit da25a8ec6b2d ("staging: rtl8188eu: remove unused
debugging functions") is_signal_dbg is never set to true, so the code
under if (adapter->recvpriv.is_signal_dbg) is dead. Remove the
variable and the dead code.
The signal_strength_dbg was referenced only in the code that is being
removed, so remove it as well.
Also fix coding style issues in the touched lines.
Luca Ceresoli [Thu, 29 Dec 2016 23:01:04 +0000 (00:01 +0100)]
staging: rtl8188eu: remove unused field bRxRSSIDisplay in struct adapter
Since commit da25a8ec6b2d ("staging: rtl8188eu: remove unused
debugging functions") this field is never set set to any nonzero
value, so it is actually always zero.
It is also used only once, as a boolean inside an if(). This means the
code under that if() is dead code, so remove it as well.
Jannik Becher [Tue, 20 Dec 2016 17:59:42 +0000 (18:59 +0100)]
staging: rtl8712: changed GetFrameSubType macro
Fixed a sparse warning.
GetFrameSubType and GetFrameType should cast to __le16. Furthermore
GetFramSubType should use le16_to_cpu instead of cpu_to_le16.
staging: greybus: svc_watchdog: replace printk() with pr_err()
Fix coding style issue caught by checkpatch.pl related to the following
warning:
- "WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then
dev_err(dev, ... then pr_err(... to printk(KERN_ERR ."
staging: greybus: arche-apb-ctrl: fix unused warnings on resume/suspend
When CONFIG_PM_SLEEP is disabled, SIMPLE_DEV_PM_OPS does not use
arche_apb_ctrl_resume and arche_apb_ctrl_suspend functions:
drivers/staging/greybus/arche-apb-ctrl.c:478:12: warning:
‘arche_apb_ctrl_resume’ defined but not used [-Wunused-function]
static int arche_apb_ctrl_resume(struct device *dev)
^~~~~~~~~~~~~~~~~~~~~
drivers/staging/greybus/arche-apb-ctrl.c:464:12: warning:
‘arche_apb_ctrl_suspend’ defined but not used [-Wunused-function]
static int arche_apb_ctrl_suspend(struct device *dev)
^~~~~~~~~~~~~~~~~~~~~~
Adding __maybe_unused to the declaration of these functions removes the
warnings.
Jason Hrycay [Tue, 20 Dec 2016 20:49:27 +0000 (14:49 -0600)]
staging: greybus: add host device function pointer checks
Add sanity checks for cport_quiesce and cport_clear before invoking the
callbacks as these function pointers are not required during the host
device registration. This follows the logic implemented elsewhere for
various other function pointers.
Signed-off-by: Jason Hrycay <jhrycay@gmail.com> Reviewed-by: Bryan O'Donoghue <pure.logic@nexus-software.ie> Acked-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bryan O'Donoghue [Thu, 22 Dec 2016 00:37:28 +0000 (00:37 +0000)]
staging: greybus: loopback: use gb_loopback_async_wait_all don't spin
Currently the greybus-loopback thread logic spins around waiting for
send_count == iteration_max which on real hardware doesn't make a
difference to us but in simulation is excruciatingly slow, anti-social and
bad manners. Use the existing gb_loopback_async_wait_all() function to gate
continuing when the send_count == iteration_max and go to sleep until
there's something worthwhile to-do.
The probe function is not marked __init, but some other functions
are. This leads to a warning on older compilers (e.g. gcc-4.3),
and can cause executing freed memory when built with those
compilers:
WARNING: drivers/staging/emxx_udc/emxx_udc.o(.text+0x2d78): Section mismatch in reference from the function nbu2ss_drv_probe() to the function .init.text:nbu2ss_drv_contest_init()
This removes the annotations.
Fixes: 33aa8d45a4fe ("staging: emxx_udc: Add Emma Mobile USB Gadget driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
In calls to queue_message() in vchiq_core.c, the "void *context"
parameter is set as 0 rather than NULL. This patch amends each call to
use the proper NULL pointer. The following sparse warnings are fixed:
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:1623:23: warning: Using plain integer as NULL pointer
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:1976:47: warning: Using plain integer as NULL pointer
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:2075:47: warning: Using plain integer as NULL pointer
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:2095:47: warning: Using plain integer as NULL pointer
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:2907:39: warning: Using plain integer as NULL pointer
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:2929:39: warning: Using plain integer as NULL pointer
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:3059:72: warning: Using plain integer as NULL pointer
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:3860:31: warning: Using plain integer as NULL pointer
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:3870:31: warning: Using plain integer as NULL pointer
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c:3880:31: warning: Using plain integer as NULL pointer
Signed-off-by: Mike Kofron <mpkofron@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Scott Matheina [Wed, 21 Dec 2016 02:42:19 +0000 (20:42 -0600)]
staging: fbtft: fix code alignment with open parenthesis
These changes where identified by checkpatch.pl as needed changes to
align the code with the linux development coding style. The several
lines of text where aligned with the precending parenthesis.
Signed-off-by: Scott Matheina <scott@matheina.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Staging: comedi: proc: Warn if unable to create proc entry
The proc entry is not essential for the comedi system as
evident by the support for !CONFIG_PROC_FS. So for failure
to create, just warn and continue loading.
Staging: comedi: proc: Change file permission to read only
As there's no write operation, change to read only.
Was inadvertantly switched to 0644 in commit 1f817b86d5e6
("comedi: Don't use create_proc_read_entry()").
Piotr Gregor [Wed, 14 Dec 2016 13:42:11 +0000 (13:42 +0000)]
drivers: staging: comedi: fix function prototypes
Add names of parameters to function prototypes in comedi PCI.
Checkpatch reports now no errors.
Signed-off-by: Piotr Gregor <piotrgregor@rsyncme.org> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jaewon Kim [Fri, 9 Dec 2016 05:05:30 +0000 (14:05 +0900)]
staging: android: ion: return -ENOMEM in ion_cma_heap allocation failure
Initial Commit 349c9e138551 ("gpu: ion: add CMA heap") returns -1 in allocation
failure. The returned value is passed up to userspace through ioctl. So user can
misunderstand error reason as -EPERM(1) rather than -ENOMEM(12).
This patch simply changed this to return -ENOMEM.
Signed-off-by: Jaewon Kim <jaewon31.kim@samsung.com> Acked-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Thu, 22 Dec 2016 16:09:02 +0000 (11:09 -0500)]
staging: unisys: visorbus: Convert references to /proc to /sys
Removes references to visorchipset in the /proc filesystem, and replaces
them with references to the /sys filesystem. Also removes reference to the
visorchipset driver, and replaces it with a reference to plain
visorchipset (since it is no longer a standalone driver).
Signed-off-by: David Binder <david.binder@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Thu, 22 Dec 2016 16:09:00 +0000 (11:09 -0500)]
staging: unisys: visorbus: Remove unneeded checks for valid variable addr
The 'retry' variable created in handle_command() is statically allocated,
and its address is never set to NULL. Therefore conditionals to verify
the validity of the retry variable's address are unnecessary.
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David Binder <david.binder@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Binder [Thu, 22 Dec 2016 16:08:59 +0000 (11:08 -0500)]
staging: unisys: visorbus: Use switch statement instead of conditionals
Control flow is now directed using a switch statement, triggered by the
enum crash_obj_type function parameter, instead of a set of conditional
statements.
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David Binder <david.binder@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>