[PATCH 2/2] staging: rtl8192e: Clean up tests if NULL returned on failure

2017-03-03 Thread simran singhal
Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...); ... - e == NULL + !e Signed-off-by: simran singhal

Re: [PATCH 1/7] staging: media: Remove unnecessary typecast of c90 int constant

2017-03-03 Thread SIMRAN SINGHAL
On Fri, Mar 3, 2017 at 11:15 PM, Sakari Ailus wrote: > Hi Simran, > > On Fri, Mar 03, 2017 at 01:21:56AM +0530, simran singhal wrote: >> This patch removes unnecessary typecast of c90 int constant. >> >> WARNING: Unnecessary typecast of c90 int constant >>

[PATCH v4 2/5] staging: lustre: Remove unnecessary cast on void pointer

2017-03-03 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 4 ++-- 1 file changed, 2 insertions(+)

[PATCH v4 4/5] staging: rts5208: Remove unnecessary cast on void pointer

2017-03-03 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/rts5208/rtsx_transport.c | 3 +-- 1 file changed, 1 insertion(+)

[PATCH v4 5/5] staging: rtl8712: Remove unnecessary cast on void pointer

2017-03-03 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/rtl8712/rtl8712_recv.c | 11 +-- 1 file changed, 5 inserti

[PATCH v4 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer

2017-03-03 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/lustre/lustre/llite/range_lock.c | 2 +- drivers/staging/lustre/lustre/

[PATCH v4 0/5] Remove unnecessary cast on void pointer

2017-03-03 Thread simran singhal
This patch-series removes unnecessary cast on void pointer in various drivers. v4: -change the cover-letter subject v3: -Fixed compilation warning in lustre/lustre/llite/range_lock.c simran singhal (5): staging: nvec: Remove unnecessary cast on void pointer staging: lustre: Remove

[PATCH] staging: media: Remove parentheses from return arguments

2017-03-03 Thread simran singhal
The sematic patch used for this is: @@ identifier i; constant c; @@ return - ( \(i\|-i\|i(...)\|c\) - ) ; Signed-off-by: simran singhal --- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 20 ++-- .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 2 +- 2 files

Re: [Outreachy kernel] Re: [PATCH v3 0/5] Fixed compilation error

2017-03-03 Thread SIMRAN SINGHAL
On Fri, Mar 3, 2017 at 9:45 PM, Julia Lawall wrote: > > > On Fri, 3 Mar 2017, SIMRAN SINGHAL wrote: > >> On Fri, Mar 3, 2017 at 9:20 PM, Joe Perches wrote: >> > On Fri, 2017-03-03 at 17:05 +0530, simran singhal wrote: >> >> Fixed compilation warn

Re: [PATCH v3 0/5] Fixed compilation error

2017-03-03 Thread SIMRAN SINGHAL
On Fri, Mar 3, 2017 at 9:20 PM, Joe Perches wrote: > On Fri, 2017-03-03 at 17:05 +0530, simran singhal wrote: >> Fixed compilation warning in lustre/lustre/llite/range_lock.c > > Really? What compilation warning was removed? CC [M] drivers/staging/lustre/lustre/mgc/mgc_re

[PATCH v3 1/3] staging: wlan-ng: Replace "the the " with "the"

2017-03-03 Thread simran singhal
This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: simran singhal --- drivers/staging/wlan-ng/prism2sta.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH v3 2/3] staging: rtl8192u: Replace "the the " with "the"

2017-03-03 Thread simran singhal
This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: simran singhal --- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +- 1 file changed, 1 insert

[PATCH v3 3/3] staging: unisys: Replace "the the " with "the"

2017-03-03 Thread simran singhal
This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: simran singhal --- drivers/staging/unisys/visorbus/visorbus_main.c | 2 +- 1 file changed, 1 insert

[PATCH v3 0/3] Replace "the the " with "the"

2017-03-03 Thread simran singhal
This patch series replace "the the " with "the" in various drivers. v3: -Resend the complete patch series. simran singhal (3): staging: wlan-ng: Replace "the the " with "the" staging: rtl8192u: Replace "the the " with "the"

[PATCH v3 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer

2017-03-03 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/lustre/lustre/llite/range_lock.c | 2 +- drivers/staging/lustre/lustre/

[PATCH v1 0/3] Replace "the the " with "the"

2017-03-03 Thread simran singhal
This patch series replace "the the " with "the" in various drivers. v1: -Adding cover-letter for the series. simran singhal (3): staging: wlan-ng: Replace "the the " with "the" staging: rtl8192u: Replace "the the " with "the"

[PATCH v1 1/3] staging: wlan-ng: Replace "the the " with "the"

2017-03-03 Thread simran singhal
This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: simran singhal --- drivers/staging/wlan-ng/prism2sta.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH v1 3/3] staging: unisys: Replace "the the " with "the"

2017-03-03 Thread simran singhal
This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: simran singhal --- drivers/staging/unisys/visorbus/visorbus_main.c | 2 +- 1 file changed, 1 insert

[PATCH v1 2/3] staging: rtl8192u: Replace "the the " with "the"

2017-03-03 Thread simran singhal
This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: simran singhal --- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +- 1 file changed, 1 insert

[PATCH v2 3/3] staging: unisys: Replace "the the " with "the"

2017-03-03 Thread simran singhal
This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: simran singhal --- drivers/staging/unisys/visorbus/visorbus_main.c | 2 +- 1 file changed, 1 insert

[PATCH v2 1/3] staging: wlan-ng: Replace "the the " with "the"

2017-03-03 Thread simran singhal
This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: simran singhal --- drivers/staging/wlan-ng/prism2sta.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH v2 0/3] Replace "the the " with "the"

2017-03-03 Thread simran singhal
This patch series replace "the the " with "the" in various drivers. v2: -Adding cover-letter for the series. simran singhal (3): staging: wlan-ng: Replace "the the " with "the" staging: rtl8192u: Replace "the the " with "the"

[PATCH v2 2/3] staging: rtl8192u: Replace "the the " with "the"

2017-03-03 Thread simran singhal
This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: simran singhal --- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +- 1 file changed, 1 insert

[PATCH 2/3] staging: rtl8192u: Replace "the the " with "the"

2017-03-03 Thread simran singhal
This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: simran singhal --- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +- 1 file changed, 1 insert

[PATCH v2 1/3] staging: wlan-ng: Replace "the the " with "the"

2017-03-03 Thread simran singhal
This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: simran singhal --- drivers/staging/wlan-ng/prism2sta.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 3/3] staging: unisys: Replace "the the " with "the"

2017-03-03 Thread simran singhal
This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: simran singhal --- drivers/staging/unisys/visorbus/visorbus_main.c | 2 +- 1 file changed, 1 insert

[PATCH 1/3] staging: wlan-ng: Replace "the the " with "the"

2017-03-03 Thread simran singhal
This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: simran singhal --- drivers/staging/wlan-ng/prism2sta.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH v3 4/5] staging: rts5208: Remove unnecessary cast on void pointer

2017-03-03 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/rts5208/rtsx_transport.c | 3 +-- 1 file changed, 1 insertion(+)

[PATCH v3 0/5] Fixed compilation error

2017-03-03 Thread simran singhal
Fixed compilation warning in lustre/lustre/llite/range_lock.c simran singhal (5): staging: nvec: Remove unnecessary cast on void pointer staging: lustre: Remove unnecessary cast on void pointer staging: lustre: lustre: Remove unnecessary cast on void pointer staging: rts5208: Remove

[PATCH v3 5/5] staging: rtl8712: Remove unnecessary cast on void pointer

2017-03-03 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/rtl8712/rtl8712_recv.c | 11 +-- 1 file changed, 5 inserti

[PATCH v3 2/5] staging: lustre: Remove unnecessary cast on void pointer

2017-03-03 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 4 ++-- 1 file changed, 2 insertions(+)

[PATCH v3 1/5] staging: nvec: Remove unnecessary cast on void pointer

2017-03-03 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/nvec/nvec_kbd.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH v2 4/5] staging: rts5208: Remove unnecessary cast on void pointer

2017-03-03 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- v2: -Moved buf to the previous line. drivers/staging/rts5208/rtsx_transport.c

[PATCH v2 5/5] staging: rtl8712: Remove unnecessary cast on void pointer

2017-03-03 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- v2: -Moved pcontext to the previous line drivers/staging/rtl8712/rtl8712_recv.c |

[PATCH 1/6] staging: wlan-ng: Fix sparse warning of restricted __le16

2017-03-02 Thread simran singhal
This patch fixes the following sparse warning: warning: cast to restricted __le16 Signed-off-by: simran singhal --- drivers/staging/wlan-ng/prism2sta.c | 51 ++--- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/drivers/staging/wlan-ng/prism2sta.c

[PATCH 2/7] staging: media: Add blank line after a declaration

2017-03-02 Thread simran singhal
Add blank line after a declaration. Problem found using checkpatch. This patch fixes these warning messages found by checkpatch.pl: WARNING : Missing a blank line after declarations. Signed-off-by: simran singhal --- drivers/staging/media/atomisp/i2c/gc2235.c | 7 +++ 1 file changed, 7

Re: [Outreachy kernel] [PATCH 5/5] staging: rtl8712: Remove unnecessary cast on void pointer

2017-03-02 Thread SIMRAN SINGHAL
On Fri, Mar 3, 2017 at 3:26 AM, Julia Lawall wrote: >> @@ -635,7 +635,7 @@ void r8712_reordering_ctrl_timeout_handler(void >> *pcontext) >> { >> unsigned long irql; >> struct recv_reorder_ctrl *preorder_ctrl = >> - (struct recv_reorder_ctrl *)pcontext; >>

Re: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer

2017-03-02 Thread SIMRAN SINGHAL
On Fri, Mar 3, 2017 at 3:29 AM, Joe Perches wrote: > On Fri, 2017-03-03 at 03:25 +0530, SIMRAN SINGHAL wrote: >> On Fri, Mar 3, 2017 at 3:13 AM, Joe Perches wrote: >> > On Fri, 2017-03-03 at 02:49 +0530, simran singhal wrote: >> > > The following Coccinelle

Re: [Outreachy kernel] [PATCH 4/5] staging: rts5208: Remove unnecessary cast on void pointer

2017-03-02 Thread SIMRAN SINGHAL
On Fri, Mar 3, 2017 at 3:26 AM, Julia Lawall wrote: >> diff --git a/drivers/staging/rts5208/rtsx_transport.c >> b/drivers/staging/rts5208/rtsx_transport.c >> index 2379901..d745b93 100644 >> --- a/drivers/staging/rts5208/rtsx_transport.c >> +++ b/drivers/staging/rts5208/rtsx_transport.c >> @@ -76

Re: [PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer

2017-03-02 Thread SIMRAN SINGHAL
On Fri, Mar 3, 2017 at 3:13 AM, Joe Perches wrote: > On Fri, 2017-03-03 at 02:49 +0530, simran singhal wrote: >> The following Coccinelle script was used to detect this: >> @r@ >> expression x; >> void* e; >> type T; >> identifier f; >>

[PATCH 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer

2017-03-02 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/lustre/lustre/llite/range_lock.c | 2 +- drivers/staging/lustre/lustre/

[PATCH 1/5] staging: nvec: Remove unnecessary cast on void pointer

2017-03-02 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/nvec/nvec_kbd.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH 5/5] staging: rtl8712: Remove unnecessary cast on void pointer

2017-03-02 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/rtl8712/rtl8712_recv.c | 10 +- 1 file changed, 5 insertions(+)

[PATCH 4/5] staging: rts5208: Remove unnecessary cast on void pointer

2017-03-02 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/rts5208/rtsx_transport.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH 2/5] staging: lustre: Remove unnecessary cast on void pointer

2017-03-02 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 4 ++-- 1 file changed, 2 insertions(+)

[PATCH 1/7] staging: media: Remove unnecessary typecast of c90 int constant

2017-03-02 Thread simran singhal
This patch removes unnecessary typecast of c90 int constant. WARNING: Unnecessary typecast of c90 int constant Signed-off-by: simran singhal --- drivers/staging/media/atomisp/i2c/gc2235.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/atomisp

[PATCH] staging: nvec: Remove unnecessary cast on void pointer

2017-03-02 Thread simran singhal
The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal --- drivers/staging/nvec/nvec_kbd.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH 5/6] staging: rtl8192u: Fix Sparse warning of cast from restricted __le16

2017-03-02 Thread simran singhal
__le16 And added space before '|' Signed-off-by: simran singhal --- drivers/staging/rtl8192u/r8192U_dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c index 9209aad..e1c83a3 100644 ---

[PATCH 4/7] staging: media: Remove blank line before '}' and after '{' braces

2017-03-02 Thread simran singhal
Remove unneeded blank lines preceding/following '}' and '{' braces, as pointed out by checkpatch. This patch addresses the following checkpatch checks: CHECK: Blank lines aren't necessary before a close brace '}' CHECK: Blank lines aren't necessary after

[PATCH 6/7] staging: media: Use x instead of x != NULL

2017-03-02 Thread simran singhal
Use x instead of x != NULL . This patch removes the explicit NULL comparisons.This issue is found by checkpatch.pl script. Signed-off-by: simran singhal --- drivers/staging/media/atomisp/i2c/gc2235.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media

[PATCH 5/7] staging: media: Remove multiple assignments

2017-03-02 Thread simran singhal
Remove multiple assignments by factorizing them. Problem found using checkpatch.pl CHECK: multiple assignments should be avoided Signed-off-by: simran singhal --- drivers/staging/media/atomisp/i2c/gc2235.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH 7/7] staging: media: Do not use multiple blank lines

2017-03-02 Thread simran singhal
Remove multiple blank lines. Problem found using checkpatch.pl "CHECK: Please don't use multiple blank lines". Signed-off-by: simran singhal --- drivers/staging/media/atomisp/i2c/gc2235.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/gc22

[PATCH 3/7] staging: media: Replace NULL with "!"

2017-03-02 Thread simran singhal
Use ! in comparison tests using "==NULL" rather than moving the "==NULL" to the right side of the test. Addesses multiple instances of the checkpatch.pl warning: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: simran singhal --- d

[PATCH] staging: nvec: cleanup USLEEP_RANGE checkpatch checks

2017-03-02 Thread simran singhal
Resolve strict checkpatch USLEEP_RANGE checks by converting delays and sleeps as described in ./Documentation/timers/timers-howto.txt. CHECK: usleep_range is preferred over udelay; see Documentation/ timers/timers-howto.txt Signed-off-by: simran singhal --- drivers/staging/nvec/nvec.c | 4

[PATCH 2/6] staging: wlan-ng: Fix sparse warnings

2017-03-02 Thread simran singhal
:got restricted __le16 [usertype] Signed-off-by: simran singhal --- drivers/staging/wlan-ng/hfa384x_usb.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 6134eba..a7ff572 100644

[PATCH 6/6] staging: rtl8192u: Fix Sparse warning of cast to restricted __le16

2017-03-02 Thread simran singhal
This patch fixes the following Sparse warnings:- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c:177:16: warning: cast to restricted __le16 Signed-off-by: simran singhal --- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v2 4/6] staging: fbtft: Fix sparse warnings of incorrect type in assignment

2017-03-02 Thread simran singhal
restricted __be64 [usertype] Signed-off-by: simran singhal --- v2: -changed commit message drivers/staging/fbtft/fbtft-bus.c | 2 +- drivers/staging/fbtft/fbtft-io.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers

[PATCH v2 3/6] staging: wlan-ng: Fix sparse warnings in hfa384x_usb.c

2017-03-02 Thread simran singhal
/wlan-ng/hfa384x_usb.c:3527:34:got restricted __be32 [usertype] Signed-off-by: simran singhal --- v2: -changed commit message drivers/staging/wlan-ng/hfa384x_usb.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wlan-ng

[PATCH 4/6] staging: fbtft: Fix sparse warnings of incorrect type in assignment

2017-03-02 Thread simran singhal
: simran singhal --- drivers/staging/fbtft/fbtft-bus.c | 2 +- drivers/staging/fbtft/fbtft-io.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c index ec45043..df2223e 100644 --- a/drivers/staging/fbtft/fbtft

Re: [Outreachy kernel] [PATCH 1/6] staging: wlan-ng: Fix sparse warning of restricted __le16

2017-03-02 Thread SIMRAN SINGHAL
On Thu, Mar 2, 2017 at 3:20 PM, Julia Lawall wrote: > > > On Thu, 2 Mar 2017, Julia Lawall wrote: > >> >> >> On Thu, 2 Mar 2017, simran singhal wrote: >> >> > This patch fixes the following sparse warning: >> > warning: cast to restricted __l

[PATCH 3/6] staging: wlan-ng: Fix sparse warnings in hfa384x_usb.c

2017-03-02 Thread simran singhal
__be32 [usertype] Signed-off-by: simran singhal --- drivers/staging/wlan-ng/hfa384x_usb.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index a7ff572..cdf987b 100644 --- a

Re: [Outreachy kernel] [PATCH 4/5] staging: sm750fb: Remove unnecessary else after return

2017-02-28 Thread SIMRAN SINGHAL
On Tue, Feb 28, 2017 at 2:45 AM, Julia Lawall wrote: > > > On Mon, 27 Feb 2017, simran singhal wrote: > >> This patch fixes the checkpatch warning that else is not generally >> useful after a break or return. >> >> This was done using Coccinelle: >

Re: [PATCH v2] staging: iio: accel: Move header file content to source file

2017-02-28 Thread SIMRAN SINGHAL
On Wed, Mar 1, 2017 at 1:04 AM, Lars-Peter Clausen wrote: > On 02/28/2017 08:32 PM, SIMRAN SINGHAL wrote: >> On Wed, Mar 1, 2017 at 12:53 AM, Jonathan Cameron wrote: >>> On 28/02/17 19:17, Jonathan Cameron wrote: >>>> On 28/02/17 18:51, simran singhal wrote: >>

Re: [Outreachy kernel] [PATCH 3/5] staging: rtl8712: Remove unnecessary else after return

2017-02-28 Thread SIMRAN SINGHAL
On Tue, Feb 28, 2017 at 2:49 AM, Julia Lawall wrote: > > > On Mon, 27 Feb 2017, simran singhal wrote: > >> This patch fixes the checkpatch warning that else is not generally >> useful after a break or return. >> >> This was done using Coccinelle: >

Re: [PATCH 5/5] staging: gdm724x: Remove unnecessary else after return

2017-02-28 Thread SIMRAN SINGHAL
On Tue, Feb 28, 2017 at 1:49 AM, SIMRAN SINGHAL wrote: > On Tue, Feb 28, 2017 at 1:11 AM, Joe Perches wrote: >> On Mon, 2017-02-27 at 23:44 +0530, simran singhal wrote: >>> This patch fixes the checkpatch warning that else is not generally >>> useful after a break or r

[PATCH v3] staging: iio: adis16201: Move header file content to source file

2017-02-28 Thread simran singhal
The contents of the header file are used only by this single source file. Move content into .c and remove .h. Signed-off-by: simran singhal --- v3: -Removing endif as it is not needed -Changing subject drivers/staging/iio/accel/adis16201.h | 144

Re: [PATCH v2] staging: iio: accel: Move header file content to source file

2017-02-28 Thread SIMRAN SINGHAL
On Wed, Mar 1, 2017 at 12:53 AM, Jonathan Cameron wrote: > On 28/02/17 19:17, Jonathan Cameron wrote: >> On 28/02/17 18:51, simran singhal wrote: >>> The contents of the header file are used only by this single >>> source file. Move content into .c and remove .h. &g

Re: [PATCH 1/5] staging: lustre: Remove unnecessary else after return

2017-02-28 Thread SIMRAN SINGHAL
On Tue, Feb 28, 2017 at 2:13 AM, Joe Perches wrote: > On Tue, 2017-02-28 at 01:51 +0530, SIMRAN SINGHAL wrote: >> On Tue, Feb 28, 2017 at 12:55 AM, Joe Perches wrote: >> > On Mon, 2017-02-27 at 23:44 +0530, simran singhal wrote: >> > > This patch fixes the check

Re: [Outreachy kernel] [PATCH 4/5] staging: sm750fb: Remove unnecessary else after return

2017-02-28 Thread SIMRAN SINGHAL
On Wed, Mar 1, 2017 at 12:30 AM, Julia Lawall wrote: > > > On Wed, 1 Mar 2017, SIMRAN SINGHAL wrote: > >> On Tue, Feb 28, 2017 at 2:45 AM, Julia Lawall wrote: >> > >> > >> > On Mon, 27 Feb 2017, simran singhal wrote: >> > >> >>

[PATCH v2] staging: iio: accel: Move header file content to source file

2017-02-28 Thread simran singhal
The contents of the header file are used only by this single source file. Move content into .c and remove .h. Signed-off-by: simran singhal --- v2: -Removing ifndef and define drivers/staging/iio/accel/adis16201.h | 144 - drivers/staging/iio/accel

Re: [PATCH 5/5] staging: gdm724x: Remove unnecessary else after return

2017-02-27 Thread SIMRAN SINGHAL
On Tue, Feb 28, 2017 at 1:11 AM, Joe Perches wrote: > On Mon, 2017-02-27 at 23:44 +0530, simran singhal wrote: >> This patch fixes the checkpatch warning that else is not generally >> useful after a break or return. > >> This was done using Coccinelle: >> @@ >

Re: [PATCH 4/5] staging: sm750fb: Remove unnecessary else after return

2017-02-27 Thread SIMRAN SINGHAL
On Tue, Feb 28, 2017 at 1:01 AM, Joe Perches wrote: > On Mon, 2017-02-27 at 23:44 +0530, simran singhal wrote: >> This patch fixes the checkpatch warning that else is not generally >> useful after a break or return. > [] >> diff --git a/drivers/staging/sm750fb/ddk750_swi2c

Re: [PATCH 1/5] staging: lustre: Remove unnecessary else after return

2017-02-27 Thread SIMRAN SINGHAL
On Tue, Feb 28, 2017 at 12:55 AM, Joe Perches wrote: > On Mon, 2017-02-27 at 23:44 +0530, simran singhal wrote: >> This patch fixes the checkpatch warning that else is not generally >> useful after a break or return. > > checkpatch doesn't actually warn for this

[PATCH] staging: iio: accel: Move header file content to source file

2017-02-27 Thread simran singhal
The contents of the header file are used only by this single source file. Move content into .c and remove .h. Signed-off-by: simran singhal --- drivers/staging/iio/accel/adis16201.h | 144 drivers/staging/iio/accel/adis16201_core.c | 145

[PATCH 2/5] staging: rtl8192u: Remove unnecessary else after return

2017-02-27 Thread simran singhal
This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: simran singhal --- drivers/staging/rtl8192u/ieee80211

[PATCH 5/5] staging: gdm724x: Remove unnecessary else after return

2017-02-27 Thread simran singhal
This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: simran singhal --- drivers/staging/gdm724x/gdm_endian.c | 12

[PATCH 3/5] staging: rtl8712: Remove unnecessary else after return

2017-02-27 Thread simran singhal
This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: simran singhal --- drivers/staging/rtl8712/os_intfs.c | 3 +-- 1

[PATCH 1/5] staging: lustre: Remove unnecessary else after return

2017-02-27 Thread simran singhal
This patch fixes the checkpatch warning that else is not generally useful after a break or return. @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: simran singhal --- drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 3 +-- drivers/staging

[PATCH 4/5] staging: sm750fb: Remove unnecessary else after return

2017-02-27 Thread simran singhal
This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: simran singhal --- drivers/staging/sm750fb/ddk750_sii164.c | 6

Re: [PATCH v2 6/6] staging: rtl8192e: Removed unnecessary parentheses

2017-02-24 Thread SIMRAN SINGHAL
On Fri, Feb 24, 2017 at 10:47 PM, Greg KH wrote: > On Mon, Feb 20, 2017 at 10:41:47PM +0530, simran singhal wrote: >> Extra parentheses were causing checkpatch issues >> and were removed. >> >> Signed-off-by: simran singhal >> --- >> >> v2: >&

[PATCH v2 5/6] staging: lustre: Using macro DIV_ROUND_UP

2017-02-22 Thread simran singhal
(e1,e2) ) Signed-off-by: simran singhal --- v2: -Removed unnecessary parantheses from the right side of assignment. drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 +- drivers/staging/lustre/lnet/selftest/conrpc.c | 11 --- drivers/staging/lustre/lustre/ptlrpc

[PATCH v2 2/7] staging: most: Using macro DIV_ROUND_UP

2017-02-22 Thread simran singhal
(e1,e2) ) Signed-off-by: simran singhal --- v2: -Included kernel.h as DIV_ROUND_UP is defined in it, before it was giving compilation error. drivers/staging/most/hdm-dim2/dim2_hal.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/most/hdm-dim2

[PATCH 3/7] staging: gdm724x: Drop useless initialisation

2017-02-21 Thread simran singhal
Removed initialisation of a varible if it is immediately reassigned. Changes were made using Coccinelle. @@ type T; constant C; expression e; identifier i; @@ T i - = C ; i = e; Signed-off-by: simran singhal --- drivers/staging/gdm724x/gdm_lte.c | 2 +- drivers/staging/gdm724x/gdm_mux.c | 4

[PATCH 2/7] staging: most: Using macro DIV_ROUND_UP

2017-02-21 Thread simran singhal
(e1,e2) ) Signed-off-by: simran singhal --- drivers/staging/most/hdm-dim2/dim2_hal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.c b/drivers/staging/most/hdm-dim2/dim2_hal.c index 0b9816c..6824826 100644 --- a/drivers/staging

[PATCH 1/7] staging: vc04_services: Using macro DIV_ROUND_UP

2017-02-21 Thread simran singhal
(e1,e2) ) Signed-off-by: simran singhal --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 +- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vc04_services/interface

[PATCH 6/6] staging: comedi: Using macro DIV_ROUND_UP

2017-02-21 Thread simran singhal
(e1,e2) ) Signed-off-by: simran singhal --- drivers/staging/comedi/drivers/addi_apci_3xxx.c | 2 +- drivers/staging/comedi/drivers/cb_pcidas64.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi_apci_3xxx.c b/drivers/staging/comedi

[PATCH 5/6] staging: lustre: Using macro DIV_ROUND_UP

2017-02-21 Thread simran singhal
(e1,e2) ) Signed-off-by: simran singhal --- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 +- drivers/staging/lustre/lnet/selftest/conrpc.c | 11 --- drivers/staging/lustre/lustre/ptlrpc/client.c | 3 +-- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 2

[PATCH 4/6] staging: Drop useless initialisation

2017-02-21 Thread simran singhal
Removed initialisation of a varible if it is immediately reassigned. Changes were made using Coccinelle. @@ type T; constant C; expression e; identifier i; @@ T i - = C ; i = e; Signed-off-by: simran singhal --- drivers/staging/android/ion/ion_heap.c | 2 +- drivers/staging

[PATCH v2 3/6] staging: greybus: Remove unnecessary braces

2017-02-21 Thread simran singhal
This patch removes braces for single statement blocks. The warning was detected using checkpatch.pl. Coccinelle was used to make the change. @@ expression e,e1; @@ - if (e) { + if (e) e1; - } Signed-off-by: simran singhal --- v2: -I forgot to cc outreachy mailing list drivers/staging

[PATCH 3/6] staging: greybus: Remove unnecessary braces

2017-02-21 Thread simran singhal
This patch removes braces for single statement blocks. The warning was detected using checkpatch.pl. Coccinelle was used to make the change. @@ expression e,e1; @@ - if (e) { + if (e) e1; - } Signed-off-by: simran singhal --- drivers/staging/greybus/audio_manager_sysfs.c | 3 +-- drivers

[PATCH v2 6/6] staging: rtl8192e: Removed unnecessary parentheses

2017-02-20 Thread simran singhal
Extra parentheses were causing checkpatch issues and were removed. Signed-off-by: simran singhal --- v2: -Removed parentheses around argument of cast -Removed cast drivers/staging/rtl8192e/rtl819x_HTProc.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH 2/6] staging: rtl8192e: Change form of NULL comparisons

2017-02-19 Thread simran singhal
Change null comparisons of the form x == NULL to !x. This was done using Coccinelle. @@ expression e; @@ - e == NULL + !e Signed-off-by: simran singhal --- drivers/staging/rtl8192e/rtl819x_TSProc.c| 2 +- drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 2 +- drivers/staging/rtl8192e

[PATCH v3 1/6] staging: vt6655: Compress return logic

2017-02-18 Thread simran singhal
Simplify function returns by merging assignment and return into one command line. Found with Coccinelle @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: simran singhal --- v2: -Removed assignment v3: -Removed declaration of qwTSFOffset

[PATCH v2 1/6] staging: vt6655: Compress return logic

2017-02-18 Thread simran singhal
Coccinelle @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: simran singhal --- v2: -Removed assignment drivers/staging/vt6655/card.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/vt6655/card.c b/drivers

[PATCH 1/6] staging: vt6655: Compress return logic

2017-02-18 Thread simran singhal
Simplify function returns by merging assignment and return into one command line. Found with Coccinelle @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: simran singhal --- drivers/staging/vt6655/card.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2 3/6] staging: rtl8192e: Fix block comments warning

2017-02-18 Thread simran singhal
Align * on last line, to conform to the kernal coding style for block comments. Signed-off-by: simran singhal --- v2: -Modified commit message drivers/staging/rtl8192e/rtl819x_HT.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b

[PATCH 6/6] staging: rtl8192e: Removed unnecessary parentheses

2017-02-18 Thread simran singhal
Extra parentheses were causing checkpatch issues and were removed. Signed-off-by: simran singhal --- drivers/staging/rtl8192e/rtl819x_HTProc.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e

[PATCH 5/6] staging: rtl8192e: Fixes multiple blank lines issue

2017-02-18 Thread simran singhal
This patch fixes the checkpatch.pl issue: Please don't use multiple blank lines Signed-off-by: simran singhal --- drivers/staging/rtl8192e/rtl819x_HT.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h

[PATCH 4/6] staging: rtl8192e: Remove blank line after '{'

2017-02-18 Thread simran singhal
Remove blank line after opening brace to fix the checkpatch issue blank lines aren't necessary after a open brace '{'. Signed-off-by: simran singhal --- drivers/staging/rtl8192e/rtl819x_HT.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl819x_

[PATCH 3/6] staging: rtl8192e: Fix block comments warning

2017-02-18 Thread simran singhal
Align * on a line, to conform to the kernal coding style for block comments. Signed-off-by: simran singhal --- drivers/staging/rtl8192e/rtl819x_HT.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h

<    1   2   3   4   >