kernel-ark/drivers/staging/gdm724x
Eric S. Stone 457c005aaf 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>
2017-01-05 18:50:05 +01:00
..
gdm_endian.c staging: gdm724x: update HCI structs with new bitwise types 2017-01-05 18:50:05 +01:00
gdm_endian.h staging: gdm724x: update HCI structs with new bitwise types 2017-01-05 18:50:05 +01:00
gdm_lte.c staging: gdm724x: gdm_lte: Constify gdm_netdev_ops 2016-09-12 11:40:06 +02:00
gdm_lte.h staging: gdm724x: Align parameters to parenthesis 2016-11-29 21:57:14 +01:00
gdm_mux.c
gdm_mux.h staging: gdm724x: Add spaces around the '*' operator 2016-09-13 14:51:53 +02:00
gdm_tty.c Staging: gdm724x: gdm_tty: Fixed a checkpatch check issue. 2016-08-21 18:04:44 +02:00
gdm_tty.h staging: gdm724x: Remove one blank line in sequence 2016-11-29 21:57:15 +01:00
gdm_usb.c staging: gdm724x: gdm_usb: Remove ignored value 2016-08-21 18:04:43 +02:00
gdm_usb.h staging: gdm724x: Add spaces around the '*' operator 2016-09-13 14:51:53 +02:00
hci_packet.h staging: gdm724x: update HCI structs with new bitwise types 2017-01-05 18:50:05 +01:00
hci.h
Kconfig
Makefile
netlink_k.c staging: gdm724x: Replace semaphore netlink with mutex 2016-08-21 18:04:43 +02:00
netlink_k.h staging: gdm724x: Align parameters to parenthesis 2016-11-29 21:57:14 +01:00
TODO