Re: endian bitshift defects [ was: staging: fusb302: don't bitshift __le16 type ]

2017-06-16 Thread Joe Perches
On Sat, 2017-06-17 at 08:00 +0200, Julia Lawall wrote: > On Fri, 16 Jun 2017, Joe Perches wrote: > > On Sat, 2017-06-17 at 07:23 +0200, Julia Lawall wrote: > > > On Fri, 16 Jun 2017, Joe Perches wrote: > > > > On Fri, 2017-06-16 at 19:45 +0200, Frans Klaver wrote: > > > > > The header field in stru

Re: endian bitshift defects [ was: staging: fusb302: don't bitshift __le16 type ]

2017-06-16 Thread Julia Lawall
On Fri, 16 Jun 2017, Joe Perches wrote: > On Sat, 2017-06-17 at 08:00 +0200, Julia Lawall wrote: > > On Fri, 16 Jun 2017, Joe Perches wrote: > > > On Sat, 2017-06-17 at 07:23 +0200, Julia Lawall wrote: > > > > On Fri, 16 Jun 2017, Joe Perches wrote: > > > > > On Fri, 2017-06-16 at 19:45 +0200, F

Re: endian bitshift defects [ was: staging: fusb302: don't bitshift __le16 type ]

2017-06-16 Thread Julia Lawall
On Fri, 16 Jun 2017, Joe Perches wrote: > On Sat, 2017-06-17 at 07:23 +0200, Julia Lawall wrote: > > On Fri, 16 Jun 2017, Joe Perches wrote: > > > On Fri, 2017-06-16 at 19:45 +0200, Frans Klaver wrote: > > > > The header field in struct pd_message is declared as an __le16 type. The > > > > data

Re: endian bitshift defects [ was: staging: fusb302: don't bitshift __le16 type ]

2017-06-16 Thread Joe Perches
On Sat, 2017-06-17 at 07:23 +0200, Julia Lawall wrote: > On Fri, 16 Jun 2017, Joe Perches wrote: > > On Fri, 2017-06-16 at 19:45 +0200, Frans Klaver wrote: > > > The header field in struct pd_message is declared as an __le16 type. The > > > data in the message is supposed to be little endian. This

Re: endian bitshift defects [ was: staging: fusb302: don't bitshift __le16 type ]

2017-06-16 Thread Julia Lawall
On Fri, 16 Jun 2017, Joe Perches wrote: > On Fri, 2017-06-16 at 19:45 +0200, Frans Klaver wrote: > > The header field in struct pd_message is declared as an __le16 type. The > > data in the message is supposed to be little endian. This means we don't > > have to go and shift the individual bytes

[PATCH V2] staging: rtl8192u: style fix

2017-06-16 Thread Derek Robson
Fixed checkpatch.pl warnings of "function definition argument FOO should also have an identifier name" Found using checkpatch Signed-off-by: Derek Robson V1 had vauge subjet --- drivers/staging/rtl8192u/ieee80211/ieee80211.h | 2 +- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.h | 4

[PATCH V2] staging: rtl8723bs - remove asm includes

2017-06-16 Thread Derek Robson
Fixed checkpatch warnings "Use #include instead of " Found using checkpatch Signed-off-by: Derek Robson V1 had vauge subject. --- drivers/staging/rtl8723bs/include/osdep_service_linux.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/

[PATCH V2] staging: unisys: visorhba - style fix

2017-06-16 Thread Derek Robson
Fixed style of permissions to octal. Found using checkpatch Signed-off-by: Derek Robson V1 has vauge subject --- drivers/staging/unisys/visorhba/visorhba_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c b/drivers/staging

[PATCH V2] staging: sm750fb - style fix

2017-06-16 Thread Derek Robson
Fixed checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson V1 had vague subject --- drivers/staging/sm750fb/sm750.h | 24 1 file changed, 16 insertions(+), 8 deletions(-)

[PATCH V3] staging: vt6655 - style fix

2017-06-16 Thread Derek Robson
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson V1 and V2 had vague subject line --- drivers/staging/vt6655/card.h| 30 ++--- drivers/staging/vt6655/channel.h | 4 +-

[PATCH V2] staging: ccree: - style fix, spaces and tabs

2017-06-16 Thread Derek Robson
Changed code indent to be tabs across whole driver Found using checkpatch Signed-off-by: Derek Robson V1 had vague subject. --- drivers/staging/ccree/ssi_cipher.c | 45 +- drivers/staging/ccree/ssi_driver.c | 6 ++--- drivers/staging/ccree/ssi_driver.h

endian bitshift defects [ was: staging: fusb302: don't bitshift __le16 type ]

2017-06-16 Thread Joe Perches
On Fri, 2017-06-16 at 19:45 +0200, Frans Klaver wrote: > The header field in struct pd_message is declared as an __le16 type. The > data in the message is supposed to be little endian. This means we don't > have to go and shift the individual bytes into position when we're > filling the buffer, we

[PATCH] Staging: Remove assignments of (void*) functions

2017-06-16 Thread Naeil ZOUEIDI
Remove assignments of (void*) functions Signed-off-by: Naeil ZOUEIDI --- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c b/drivers/s

[PATCH 1/2] staging: comedi: fix clean-up of comedi_class in comedi_init()

2017-06-16 Thread Ian Abbott
There is a clean-up bug in the core comedi module initialization functions, `comedi_init()`. If the `comedi_num_legacy_minors` module parameter is non-zero (and valid), it creates that many "legacy" devices and registers them in SysFS. A failure causes the function to clean up and return an error

[PATCH 2/2] staging: comedi: use centralized error clean-up in comedi_init()

2017-06-16 Thread Ian Abbott
Centralize the "clean-up on error" handling in `comedi_init()` using `goto` statements. Also change some of the explicit `-EIO` return values to the error return values from the failing functions as there is no good reason to use `-EIO` explicitly. Signed-off-by: Ian Abbott --- drivers/staging/

[PATCH 0/2] staging: comedi: comedi_init() fix clean-up

2017-06-16 Thread Ian Abbott
Patch 1 is fixes a "clean-up on error" bug when initializing the comedi module. Patch 2 uses the power of "goto" to simplify the clean-up code. 1) staging: comedi: fix clean-up of comedi_class in comedi_init() 2) staging: comedi: use centralized error clean-up in comedi_init() drivers/staging/c

Re: [PATCH] staging: fusb302: don't bitshift __le16 type

2017-06-16 Thread Guenter Roeck
On Fri, Jun 16, 2017 at 07:45:56PM +0200, Frans Klaver wrote: > The header field in struct pd_message is declared as an __le16 type. The > data in the message is supposed to be little endian. This means we don't > have to go and shift the individual bytes into position when we're > filling the buff

[PATCH] staging: fusb302: don't bitshift __le16 type

2017-06-16 Thread Frans Klaver
The header field in struct pd_message is declared as an __le16 type. The data in the message is supposed to be little endian. This means we don't have to go and shift the individual bytes into position when we're filling the buffer, we can just copy the contents right away. As an added benefit we d

[PATCH] Staging: wlan-ng: hfa384x_usb: Fixed sparse warning cast to restricted __le16

2017-06-16 Thread Jaya Durga
when building with make C=1 CF=-D__CHECK_ENDIAN__ drivers/staging/wlan-ng/hfa384x_usb.c:3383:36: warning: cast to restricted __le16 fixed by using the le16_to_cpus function. Signed-off-by: Jaya Durga --- drivers/staging/wlan-ng/hfa384x_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

Re: [PATCH] Staging: wlan-ng: hfa384x_usb: Fixed cast to restricted __le16 sparse warning

2017-06-16 Thread Greg KH
On Fri, Jun 16, 2017 at 02:57:08PM +0530, Jaya Durga wrote: > warning: cast to restricted __le16 What does this mean? It doesn't tell us why you are doing what you are doing here. Please be much more specific and descriptive. thanks, greg k-h ___ dev

[PATCH] Staging: wlan-ng: hfa384x_usb: Fixed cast to restricted __le16 sparse warning

2017-06-16 Thread Jaya Durga
warning: cast to restricted __le16 Signed-off-by: Jaya Durga --- drivers/staging/wlan-ng/hfa384x_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index a812e55..0e95e45 100644 --- a/drivers/st