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: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

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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"

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

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

[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

[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 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 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 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 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(+)

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 0/2] Clean up tests if NULL returned on failure

2017-03-03 Thread simran singhal
This patch series tests if functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. simran singhal (2): staging: media: Clean up tests if NULL returned on failure staging: rtl8192e: Clean up tests if NULL returned on failure drivers/staging

[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

[PATCH 1/2] staging: media: 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

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

2017-03-04 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 v5 0/5] Remove unnecessary cast on void pointer

2017-03-04 Thread simran singhal
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 unnecessary cast on void pointer staging: rtl8712: Remove unnecessary

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

2017-03-04 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 v5 3/5] staging: lustre: lustre: Remove unnecessary cast on void pointer

2017-03-04 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 --- v5: -Fixed compilation warnings. drivers/staging/lustre/lustre/llite/range_loc

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

2017-03-04 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 v5 1/5] staging: nvec: Remove unnecessary cast on void pointer

2017-03-04 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

Re: [PATCH v5 0/5] Remove unnecessary cast on void pointer

2017-03-04 Thread SIMRAN SINGHAL
On Sat, Mar 4, 2017 at 9:22 PM, Joe Perches wrote: > On Sat, 2017-03-04 at 21:00 +0530, simran singhal wrote: >> This patch-series removes unnecessary cast on void pointer in various >> drivers. > > Much better, thanks. > > Trivia: (and it's probably not necessary

[PATCH 0/3] Replace "is is " with "is"

2017-03-04 Thread simran singhal
This patch series replace "is is " with "is" in various drivers. simran singhal (3): staging: rtl8192u: Replace "is is" with "is" staging: greybus: Replace "is is" with "is" staging: comedi: Replace "is is" with &quo

[PATCH 2/3] staging: greybus: Replace "is is" with "is"

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

[PATCH 1/3] staging: rtl8192u: Replace "is is" with "is"

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

[PATCH 3/3] staging: comedi: Replace "is is" with "is"

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

[PATCH 1/3] staging: rtl8192u: Clean up tests if NULL returned on failure

2017-03-04 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

[PATCH 0/3] staging: Clean up tests if NULL returned on failure

2017-03-04 Thread simran singhal
This patch series tests if functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. simran singhal (3): staging: rtl8192u: Clean up tests if NULL returned on failure staging: speakup: Clean up tests if NULL returned on failure staging

[PATCH 3/3] staging: vc04_services: Clean up tests if NULL returned on failure

2017-03-04 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

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

2017-03-04 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

[PATCH v1 0/3] staging: Replace "is is " with "is"

2017-03-04 Thread simran singhal
This patch series replace "is is " with "is" in various drivers. v1: -change the subject -Changed "If is a command..." to "It is a command..." in rtl8192u/r819xU_cmdpkt.c simran singhal (3): staging: rtl8192u: Replace "is is" with

[PATCH v1 1/3] staging: rtl8192u: Replace "is is" with "is"

2017-03-04 Thread simran singhal
This patch replace "is is " with "is". The replacement couldn't be automated because sometimes the first "is" was meant to be another word. Signed-off-by: simran singhal --- v1: -Changed "If is a command..." to "It is a command..."

[PATCH v1 2/3] staging: greybus: Replace "is is" with "is"

2017-03-04 Thread simran singhal
This patch replace "is is " with "is". The replacement couldn't be automated because sometimes the first "is" was meant to be another word. Signed-off-by: simran singhal Acked-by: Julia Lawall --- drivers/staging/greybus/uart.c | 2 +- 1 file changed, 1 inse

[PATCH v1 3/3] staging: comedi: Replace "is is" with "is"

2017-03-04 Thread simran singhal
This patch replace "is is " with "is". The replacement couldn't be automated because sometimes the first "is" was meant to be another word. Signed-off-by: simran singhal Acked-by: Julia Lawall --- drivers/staging/comedi/drivers/ni_usb6501.c | 2 +- 1 file

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

2017-03-04 Thread SIMRAN SINGHAL
On Sun, Mar 5, 2017 at 5:36 AM, Alison Schofield wrote: > On Thu, Mar 02, 2017 at 02:26:37PM +0100, Noralf Trønnes wrote: >> >> Den 02.03.2017 14.04, skrev simran singhal: >> >This patch fixes the following sparse warnings: >> > >> >drivers/staging/fb

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

2017-03-04 Thread simran singhal
:74:29:got restricted __be64 [usertype] Signed-off-by: simran singhal --- v3: -Change commit message -Drop the changes did in fbtft-bus.c drivers/staging/fbtft/fbtft-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fbtft-io.c b

[PATCH] staging: media: Remove unnecessary function and its call

2017-03-04 Thread simran singhal
The function atomisp_set_stop_timeout on being called, simply returns back. The function hasn't been mentioned in the TODO and doesn't have FIXME code around. Hence, atomisp_set_stop_timeout and its calls have been removed. Signed-off-by: simran singhal --- drivers/staging/media/a

[PATCH] staging: rtl8192u: Remove unnecessary function and its call

2017-03-05 Thread simran singhal
{ -return; } Signed-off-by: simran singhal --- drivers/staging/rtl8192u/ieee80211/ieee80211.h| 3 --- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 5 - drivers/staging/rtl8192u/ieee80211/ieee80211_module.c | 1 - 3 files changed, 9 deletions(-) diff --git a/drive

[PATCH 5/5] staging: lustre: osc_page.c: Use list_for_each_entry_safe

2017-03-05 Thread simran singhal
was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by

[PATCH 1/5] staging: lustre: Use list_for_each_entry_safe

2017-03-05 Thread simran singhal
was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by

[PATCH 3/5] staging: lustre: osc: Use list_for_each_entry_safe

2017-03-05 Thread simran singhal
was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by

[PATCH 2/5] staging: lustre: ptlrpc: Use list_for_each_entry_safe

2017-03-05 Thread simran singhal
was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by

[PATCH 4/5] staging: lustre: llite: Use list_for_each_entry_safe

2017-03-05 Thread simran singhal
was done with Coccinelle. @@ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by

[PATCH 0/5] Use list_for_each_entry_safe

2017-03-05 Thread simran singhal
This patch-series replaces the while loop containing list_empty and list_entry with list_for_each_entry_safe. simran singhal (5): staging: lustre: Use list_for_each_entry_safe staging: lustre: ptlrpc: Use list_for_each_entry_safe staging: lustre: osc: Use list_for_each_entry_safe staging

Re: [Outreachy kernel] [PATCH 2/5] staging: lustre: ptlrpc: Use list_for_each_entry_safe

2017-03-05 Thread SIMRAN SINGHAL
On Sun, Mar 5, 2017 at 11:09 PM, Julia Lawall wrote: > > > On Sun, 5 Mar 2017, simran singhal wrote: > >> Doubly linked lists which are iterated using list_empty >> and list_entry macros have been replaced with list_for_each_entry_safe >> macro. >> This

Re: [Outreachy kernel] [PATCH 5/5] staging: lustre: osc_page.c: Use list_for_each_entry_safe

2017-03-05 Thread SIMRAN SINGHAL
ine filename to see what others have done. So this would be fine Subject:- staging: lustre: osc_page: Use list_for_each_entry_safe > > julia > > On Sun, 5 Mar 2017, simran singhal wrote: > >> Doubly linked lists which are iterated using list_empty >> and li

Re: [Outreachy kernel] [PATCH 5/5] staging: lustre: osc_page.c: Use list_for_each_entry_safe

2017-03-05 Thread SIMRAN SINGHAL
On Sun, Mar 5, 2017 at 11:18 PM, Julia Lawall wrote: > > > On Sun, 5 Mar 2017, SIMRAN SINGHAL wrote: > >> On Sun, Mar 5, 2017 at 10:47 PM, Julia Lawall wrote: >> > By the way, the above subject line is not correct. Normally one does not >> > put .c/.h in the

Re: [PATCH 5/5] staging: lustre: osc_page.c: Use list_for_each_entry_safe

2017-03-06 Thread SIMRAN SINGHAL
_for_each_entry_safe; >> @@ >> >> T *I1; >> + T *tmp; >> ... >> - while (list_empty(&E1) == 0) >> + list_for_each_entry_safe (I1, tmp, &E1, I2) >> { >> ...when != T *I1; >> - I1 = list_entry(E1.next, T, I2); >> ... >> } >> >>

[PATCH v1 0/7] staging: gc2235: Multiple checkpatch issues

2017-03-09 Thread simran singhal
v1: -change the subject of all the patches of the patch-series simran singhal (7): staging: gc2235: Remove unnecessary typecast of c90 int constant staging: gc2235: Add blank line after a declaration staging: gc2235: Replace NULL with "!" staging: gc2235: Remove blank l

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

2017-03-09 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 v1 5/7] staging: gc2235: Remove multiple assignments

2017-03-09 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 v1 1/7] staging: gc2235: Remove unnecessary typecast of c90 int constant

2017-03-09 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 v1 2/7] staging: gc2235: Add blank line after a declaration

2017-03-09 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

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

2017-03-09 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 v1 6/7] staging: gc2235: Use x instead of x != NULL

2017-03-09 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 v1 7/7] staging: gc2235: Do not use multiple blank lines

2017-03-09 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 0/5] staging: rtl8192e: Clean up tests if NULL returned on failure

2017-03-09 Thread simran singhal
This patch series tests if functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. simran singhal (5): staging: rtllib_crypt_ccmp: Clean up tests if NULL returned on failure staging: rtllib_crypt_tkip: Clean up tests if NULL returned on

[PATCH 1/5] staging: rtllib_crypt_ccmp: Clean up tests if NULL returned on failure

2017-03-09 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

[PATCH 3/5] staging: rtllib_crypt_wep: Clean up tests if NULL returned on failure

2017-03-09 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

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

2017-03-09 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

[PATCH 4/5] staging: rtllib_softmac: Clean up tests if NULL returned on failure

2017-03-09 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

[PATCH 5/5] staging: rtllib_wx: Clean up tests if NULL returned on failure

2017-03-09 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

[PATCH 0/3] staging: media: Clean up tests if NULL returned on failure

2017-03-09 Thread simran singhal
This patch series tests if functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. simran singhal (3): staging: atomisp_fops: Clean up tests if NULL returned on failure staging: vpfe_mc_capture: Clean up tests if NULL returned on failure

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

2017-03-09 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

[PATCH 3/3] staging: lirc_zilog: Clean up tests if NULL returned on failure

2017-03-09 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

[PATCH 1/3] staging: atomisp_fops: Clean up tests if NULL returned on failure

2017-03-09 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

[PATCH] staging: comedi: amplc_pci224: Convert macro GAT_CONFIG to static inline function

2017-03-10 Thread simran singhal
macro has been removed manually. Signed-off-by: simran singhal --- drivers/staging/comedi/drivers/amplc_pci224.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c

[PATCH 2/2] staging: sh_css_firmware: Remove parentheses from return arguments

2017-03-10 Thread simran singhal
The sematic patch used for this is: @@ identifier i; constant c; @@ return - ( \(i\|-i\|i(...)\|c\) - ) ; Signed-off-by: simran singhal Acked-by: Julia Lawall --- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 1/2] staging: css2400/sh_css: Remove parentheses from return arguments

2017-03-10 Thread simran singhal
The sematic patch used for this is: @@ identifier i; constant c; @@ return - ( \(i\|-i\|i(...)\|c\) - ) ; Signed-off-by: simran singhal Acked-by: Julia Lawall --- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 20 ++-- 1 file changed, 10 insertions(+), 10

[PATCH 0/2] staging: media: Remove parentheses from return arguments

2017-03-10 Thread simran singhal
This patch-series removes unnecessary parantheses from return arguments. simran singhal (2): staging: css2400/sh_css: Remove parentheses from return arguments staging: sh_css_firmware: Remove parentheses from return arguments .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 20

[PATCH v1] staging: media: Remove unused function atomisp_set_stop_timeout()

2017-03-10 Thread simran singhal
@@ void f(...) { -return; } Signed-off-by: simran singhal --- v1: -Change Subject to include name of function -change commit message to include the coccinelle script drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 1 - drivers/staging/media/atomisp/pci/atomisp2/atomis

Re: [PATCH 0/5] staging: rtl8192e: Clean up tests if NULL returned on failure

2017-03-10 Thread SIMRAN SINGHAL
ferent patches. Thanks, Simran Singhal > regards, > dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH 02/10] staging: iio: ad7780: Remove exceptional & on function name

2017-03-10 Thread simran singhal
In this file,function names are otherwise used as pointers without &. Found using coccinelle. // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: simran singhal --- drivers/staging/iio/adc/ad7780.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 03/10] staging: iio: cdc: ad7746: Remove exceptional & on function name

2017-03-10 Thread simran singhal
In this file,function names are otherwise used as pointers without &. Found using coccinelle. // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: simran singhal --- drivers/staging/iio/cdc/ad7746.c | 4 ++-- 1 file changed, 2 insertions(+), 2 d

[PATCH 07/10] staging: iio: adis16209: Remove exceptional & on function name

2017-03-10 Thread simran singhal
In this file,function names are otherwise used as pointers without &. Found using coccinelle. // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: simran singhal --- drivers/staging/iio/accel/adis16209.c | 4 ++-- 1 file changed, 2 insertio

[PATCH 01/10] staging: iio: ad7192: Remove exceptional & on function name

2017-03-10 Thread simran singhal
In this file,function names are otherwise used as pointers without &. Found using coccinelle. // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - &f + f // Signed-off-by: simran singhal --- drivers/staging/iio/adc/ad7192.c | 12 ++-- 1 file changed, 6 insertio

<    1   2   3   4   >