[PATCH 4/4] Staging: rtl8188eu: core: Use list_entry instead of container_of

2017-10-18 Thread Srishti Sharma
For variables of the struct list_head* use list_entry to access current list element instead of using container_of. Done using the following semantic patch by coccinelle. @r@ struct list_head* l; @@ -container_of +list_entry (l,...) Signed-off-by: Srishti Sharma <srishtis...@gmail.

[PATCH 3/4] Staging: rtl8188eu: core: rtw_mlme_ext: Use list_for_each_entry_safe

2017-10-18 Thread Srishti Sharma
list_for_each_entry_safe; @@ f(...){ +T1* tmp; <+... -while(...) +list_for_each_entry_safe(pos,tmp,l,m) { ... -pos = container_of(l,T1,m); ... -l=e; <+... list_del_init(>m) ...+> } ...+> } Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/rtl8188eu/co

[PATCH 2/4] Staging: rtl8188eu: core: rtw_ap: Use list_for_each_entry_safe

2017-10-18 Thread Srishti Sharma
list_for_each_entry_safe; @@ f(...){ +T1* tmp; <+... -while(...) +list_for_each_entry_safe(pos,tmp,l,m) { ... -pos = container_of(l,T1,m); ... -l=e; <+... list_del_init(>m) ...+> } ...+> } Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/rtl8188

[PATCH 1/4] Staging: rtl8188eu: core: rtw_xmit: Use list_for_each_entry_safe

2017-10-18 Thread Srishti Sharma
list_for_each_entry_safe; @@ f(...){ +T1* tmp; <+... -while(...) +list_for_each_entry_safe(pos,tmp,l,m) { ... -pos = container_of(l,T1,m); ... -l=e; <+... list_del_init(>m) ...+> } ...+> } Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/rtl8188eu

[PATCH 0/4] Code cleanup

2017-10-18 Thread Srishti Sharma
This patch series performs code cleanup like using list_for_each_entry_safe to make code more compact and using list_entry instead of container_of for struct list_head* variable types. Srishti Sharma (4): Staging: rtl8188eu: core: rtw_xmit: Use list_for_each_entry_safe Staging: rtl8188eu

[PATCH v2] Staging: rtl8723bs: core: rtw_cmd: Remove cast to pointer types in kfree

2017-10-07 Thread Srishti Sharma
ree( -(P *) x ) Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v2: -Do transformation left out by coccinelle -Improve commit message drivers/staging/rtl8723bs/core/rtw_cmd.c | 60 1 file changed, 30 insertions(+), 30 deletions(-) d

Re: [Outreachy kernel] [PATCH] Staging: rtl8723bs: core: rtw_cmd: Remove cast to pointer types in kfree

2017-10-07 Thread Srishti Sharma
On Sun, Oct 8, 2017 at 1:36 AM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sun, 8 Oct 2017, Srishti Sharma wrote: > >> On Sat, Oct 7, 2017 at 11:42 PM, Julia Lawall <julia.law...@lip6.fr> wrote: >> > >> > >> > On Sat, 7 Oct 2017, S

Re: [Outreachy kernel] [PATCH] Staging: rtl8723bs: core: rtw_cmd: Remove cast to pointer types in kfree

2017-10-07 Thread Srishti Sharma
On Sat, Oct 7, 2017 at 11:42 PM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sat, 7 Oct 2017, Srishti Sharma wrote: > >> The cast to pointer types in kfree is not needed and can be dropped. >> Done using the following semantic by coccinelle.

[PATCH v2] Staging: pi433: Fix the position of brace after if

2017-10-07 Thread Srishti Sharma
lumn_end) c2 = int (p2[0].column) if l1 == l2 and c1+1 == c2: cocci.include_match(False) @r3@ position r1.p1, r1.p2; @@ if(... - )@p1 -{@p2 +) { ... } Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v2: -Improve commit message. drivers/staging/pi4

[PATCH] Staging: rtlwifi: phydm: Use setup_timer

2017-10-07 Thread Srishti Sharma
t;data = d; | - l->data = d; ... - l->function = f; ) Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/rtlwifi/phydm/phydm_interface.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/rtlwifi/phydm/phydm_interface.c b/drive

[PATCH] Staging: pi433: Fix the position of brace after if

2017-10-07 Thread Srishti Sharma
p1; p2 << r1.p2; @@ l1 = int (p1[0].line) l2 = int (p2[0].line) c1 = int (p1[0].column_end) c2 = int (p2[0].column) if l1 == l2 and c1+1 == c2: cocci.include_match(False) @r3@ position r1.p1, r1.p2; @@ if(... - )@p1 -{@p2 +) { ... } Signed-off-by: Srishti Sharma <srisht

[PATCH] Staging: media: atomisp: pci: Eliminate use of typedefs for struct

2017-10-07 Thread Srishti Sharma
occinelle.T1 = T[:-2] else: coccinelle.T1 = T print T, T1 @r2@ type r1.T; identifier p.T1; @@ - typedef struct + T1 { ... } - T ; @r3@ type r1.T; identifier p.T1; @@ - T + struct T1 Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- .../media/atomisp/pci/atomisp2/css2400/runtime/spctrl/

[PATCH] Staging: rtl8723bs: core: rtw_cmd: Remove cast to pointer types in kfree

2017-10-07 Thread Srishti Sharma
The cast to pointer types in kfree is not needed and can be dropped. Done using the following semantic by coccinelle. @r@ type T,P; T* x; @@ kfree( -(P *) x ) Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/rtl8723bs/core/rtw_cmd.

[PATCH v3] Staging: rtl8188eu: core: rtw_mlme_ext: Use list_for_each_entry_safe

2017-10-05 Thread Srishti Sharma
list_for_each_entry_safe; @@ f(...){ +T1* tmp; <+... -while(...) +list_for_each_entry_safe(pos,tmp,l,m) { ... -pos = container_of(l,T1,m); ... -l=e; <+... list_del_init(>m) ...+> } ...+> } Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v3 -Add a blank l

[PATCH v2] Staging: rtl8188eu: core: rtw_ap: Use list_for_each_entry_safe

2017-10-05 Thread Srishti Sharma
list_for_each_entry_safe; @@ f(...){ +T1* tmp; ... -while(...) +list_for_each_entry_safe(pos,tmp,l,m) { ... -pos = container_of(l,T1,m); ... -l=e; <+... list_del_init(>m) ...+> } ... } Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v2 -Make commit message cl

[PATCH v2] Staging: rtl8188eu: core: rtw_mlme_ext: Use list_for_each_entry_safe

2017-10-04 Thread Srishti Sharma
list_for_each_entry_safe; @@ f(...){ +T1* tmp; <+... -while(...) +list_for_each_entry_safe(pos,tmp,l,m) { ... -pos = container_of(l,T1,m); ... -l=e; <+... list_del_init(>m) ...+> } ...+> } Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v2 -Make th

[PATCH v2] Staging: rtl8188eu: core: rtw_xmit: Use list_for_each_entry_safe

2017-10-04 Thread Srishti Sharma
list_for_each_entry_safe; @@ f(...){ +T1* tmp; <+... -while(...) +list_for_each_entry_safe(pos,tmp,l,m) { ... -pos = container_of(l,T1,m); ... -l=e; <+... list_del_init(>m) ...+> } ...+> } Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v2 -Make comm

[PATCH v2] Staging: rtl8188eu: core: rtw_ap: Use list_for_each_entry_safe

2017-10-04 Thread Srishti Sharma
list_for_each_entry_safe; @@ f(...){ +T1* tmp; <+... -while(...) +list_for_each_entry_safe(pos,tmp,l,m) { ... -pos = container_of(l,T1,m); ... -l=e; <+... list_del_init(>m) ...+> } ...+> } Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v2 -Make comm

Re: [Outreachy kernel] [PATCH] Staging: rtl8188eu: core: Use list_for_each_entry_safe

2017-10-04 Thread Srishti Sharma
On Wed, Oct 4, 2017 at 10:37 PM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Wed, 4 Oct 2017, Srishti Sharma wrote: > >> On Wed, Oct 4, 2017 at 8:38 PM, Dan Carpenter <dan.carpen...@oracle.com> >> wrote: >> > On Wed, Oct 04, 2017 at 03:34:05P

Re: [Outreachy kernel] [PATCH] Staging: rtl8188eu: core: Use list_for_each_entry_safe

2017-10-04 Thread Srishti Sharma
subject line to make >> them unique. >> > > And the subject needs to start with [PATCH v3] and then after the > Signed off by line put: Shouldn't it be only v2 as I haven't sent a v2 for this before. Regards, Srishti > > --- > v2 and v3: Changes to the su

Re: [Outreachy kernel] Re: [PATCH] Staging: rtl8188eu: core: Use list_for_each_entry_safe

2017-10-04 Thread Srishti Sharma
gt;> > >> > > On Wed, Oct 04, 2017 at 01:58:32AM +0530, Srishti Sharma wrote: >> > > > Use list_for_each_entry_safe when the list elements may get deleted >> > > > during traversal. >> > > >> > > This patch is fine as a clea

[PATCH] Staging: rtl8188eu: core: Use list_for_each_entry_safe

2017-10-04 Thread Srishti Sharma
ile(...) +list_for_each_entry_safe(pos,tmp,l,m) { ... -pos = container_of(l,T1,m); ... -l=e; <+... list_del_init(>m) ...+> } ...+> } Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 8 +++- 1 file changed, 3 insertions(+), 5 del

[PATCH] Staging: rtl8188eu: core: Use list_for_each_entry_safe

2017-10-04 Thread Srishti Sharma
ile(...) +list_for_each_entry_safe(pos,tmp,l,m) { ... -pos = container_of(l,T1,m); ... -l=e; <+... list_del_init(>m) ...+> } ...+> } Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_xmit.c | 23 ++- 1 file changed, 6 insertions(+),

[PATCH] Staging: rtl8188eu: core: Use list_for_each_entry_safe

2017-10-04 Thread Srishti Sharma
ile(...) +list_for_each_entry_safe(pos,tmp,l,m) { ... -pos = container_of(l,T1,m); ... -l=e; <+... list_del_init(>m) ...+> } ...+> } Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_ap.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-)

[PATCH] Staging: rtl8188eu: core: Use list_entry instead of container_of

2017-10-04 Thread Srishti Sharma
For variables of the struct list_head* use list_entry to access current list element instead of using container_of. Done using the following semantic patch by coccinelle. @r@ struct list_head* l; @@ -container_of +list_entry (l,...) Signed-off-by: Srishti Sharma <srishtis...@gmail.

[PATCH] Staging: rtl8188eu: core: Use list_for_each_entry_safe

2017-10-03 Thread Srishti Sharma
; ... -while(...) +list_for_each_entry_safe(pos,tmp,l,m) { ... -pos = container_of(l,T1,m); ... -l=e; <+... list_del_init(>m) ...+> } ... } Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_ap.c | 22 ++ 1 file change

Re: [PATCH 0/6] Replace container_of with list_entry

2017-10-03 Thread Srishti Sharma
On Tue, Oct 3, 2017 at 9:44 PM, Greg KH <gre...@linuxfoundation.org> wrote: > On Sat, Sep 30, 2017 at 12:49:00PM +0530, Srishti Sharma wrote: >> Replaces instances of container_of with list_entry to >> access current list element. >> >> Srishti Sharma (6): &

[PATCH 6/6] Staging: rtl8188eu: core: Use list_entry instead of container_of

2017-09-30 Thread Srishti Sharma
For variables of type struct list_head* use list_entry to access current list element instead of using container_of. Done by the following semantic patch by coccinelle. @r@ struct list_head* l; @@ -container_of +list_entry (l,...) Signed-off-by: Srishti Sharma <srishtis...@gmail.

[PATCH 5/6] Staging: rtl8188eu: core: Use list_entry instead of container_of

2017-09-30 Thread Srishti Sharma
For variables of type struct list_head* use list_entry to access current list element instead of using container_of. Done using the following semantic patch by coccinelle. @r@ struct list_head* l; @@ -container_of +list_entry (l,...) Signed-off-by: Srishti Sharma <srishtis...@gmail.

[PATCH 4/6] Staging: rtl8188eu: core: Use list_entry instead of container_of

2017-09-30 Thread Srishti Sharma
For variables of the type struct list_head* use list_entry to access current list element instead of using container_of. Done using the following semantic patch by coccinelle. @r@ struct list_head* l; @@ -container_of +list_entry (l,...) Signed-off-by: Srishti Sharma <srishtis...@gmail.

[PATCH 3/6] Staging: rtl8188eu: core: Use list_entry instead of container_of

2017-09-30 Thread Srishti Sharma
For variables of the type struct list_head* use list_entry to access current list element instead of using container_of. Done using the following semantic patch by coccinelle. @r@ struct list_head* l; @@ -container_of +list_entry (l,...) Signed-off-by: Srishti Sharma <srishtis...@gmail.

[PATCH 2/6] Staging: rtl8188eu: core: Use list_entry instead of container_of

2017-09-30 Thread Srishti Sharma
For variables of the type struct list_head use list_entry to access current list element instead of using container_of. Done using the following semantic patch by coccinelle. @r@ struct list_head* l; @@ -container_of +list_entry (l,...) Signed-off-by: Srishti Sharma <srishtis...@gmail.

[PATCH 1/6] Staging: rtl8188eu: core: Use list_entry instead of container_of

2017-09-30 Thread Srishti Sharma
For variables of the struct list_head* use list_entry to access current list element instead of using container_of. Done using the following semantic patch by coccinelle. @r@ struct list_head* l; @@ -container_of +list_entry (l,...) Signed-off-by: Srishti Sharma <srishtis...@gmail.

[PATCH 0/6] Replace container_of with list_entry

2017-09-30 Thread Srishti Sharma
Replaces instances of container_of with list_entry to access current list element. Srishti Sharma (6): Staging: rtl8188eu: core: Use list_entry instead of container_of Staging: rtl8188eu: core: Use list_entry instead of container_of Staging: rtl8188eu: core: Use list_entry instead

Re: [Outreachy kernel] [PATCH] Staging: rtl8188eu: core: Use list_entry instead of container_of

2017-09-30 Thread Srishti Sharma
On Sat, Sep 30, 2017 at 11:51 AM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sat, 30 Sep 2017, Srishti Sharma wrote: > >> On Sat, Sep 30, 2017 at 11:36 AM, Julia Lawall <julia.law...@lip6.fr> wrote: >> > >> > >> > On Sat, 30 Sep 20

Re: [Outreachy kernel] [PATCH] Staging: rtl8188eu: core: Use list_entry instead of container_of

2017-09-30 Thread Srishti Sharma
On Sat, Sep 30, 2017 at 11:36 AM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sat, 30 Sep 2017, Srishti Sharma wrote: > >> On Sat, Sep 30, 2017 at 10:35 AM, Julia Lawall <julia.law...@lip6.fr> wrote: >> > >> > >> > On Sat, 30

Re: [Outreachy kernel] [PATCH] Staging: rtl8188eu: core: Use list_entry instead of container_of

2017-09-30 Thread Srishti Sharma
On Sat, Sep 30, 2017 at 10:35 AM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sat, 30 Sep 2017, Srishti Sharma wrote: > >> For variables of the type struct list_head* use list_entry to access >> the current list element instead of using container_of. >&g

[PATCH] Staging: rtl8188eu: core: Use list_entry instead of container_of

2017-09-29 Thread Srishti Sharma
_entry ( ...) ) Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c b/drivers/staging/rtl8188eu/core/rtw_sta

[PATCH] Staging: rtl8188eu: core: Use list_entry instead of container_of

2017-09-29 Thread Srishti Sharma
_entry ( ...) ) Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_recv.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index 3fd5

[PATCH v2 1/2] Staging: dgnc: Remove unused fields in struct dgnc_board

2017-09-16 Thread Srishti Sharma
Remove unused fields and comments associated with them in the structure definition. Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v2: - Use the word field instead of variable. drivers/staging/dgnc/dgnc_driver.h | 9 - 1 file changed, 9 deletions(-) diff

[PATCH v2 2/2] Staging: dgnc: Remove unused fields in struct channel_t

2017-09-16 Thread Srishti Sharma
Eliminate the fields that are not used and the comments associated with them. Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v2: - Use the word field instead of variable. drivers/staging/dgnc/dgnc_driver.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/d

[PATCH v2 0/2] Remove unused fields in structure definition

2017-09-16 Thread Srishti Sharma
Remove fields that are not used, from structure definitions , and eliminate the comments associated with them. Srishti Sharma (2): Staging: dgnc: Remove unused variables in structure definition Staging: dgnc: Remove unused variable in structure drivers/staging/dgnc/dgnc_driver.h | 15

[PATCH 2/2] Staging: dgnc: Remove unused variable in struct channel_t

2017-09-16 Thread Srishti Sharma
Eliminate the variables that are not used and the comments associated with them. Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/dgnc/dgnc_driver.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/stagin

[PATCH 1/2] Staging: dgnc: Remove unused variables in struct dgnc_board

2017-09-16 Thread Srishti Sharma
Remove unused variables and comments associated with them in the structure definition. Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/dgnc/dgnc_driver.h | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/s

[PATCH 0/2] Remove unused variables in structure definition

2017-09-16 Thread Srishti Sharma
This patch series attempts to remove unused variables in structure variables and the comments associated with them. Srishti Sharma (2): Staging: dgnc: Remove unused variables in structure definition Staging: dgnc: Remove unused variable in structure drivers/staging/dgnc/dgnc_driver.h | 15

Re: [Outreachy kernel] [PATCH] Staging: dgnc: Remove unused variables from structure definition

2017-09-16 Thread Srishti Sharma
On Sat, Sep 16, 2017 at 5:45 PM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sat, 16 Sep 2017, Srishti Sharma wrote: > >> On Sat, Sep 16, 2017 at 5:20 PM, Julia Lawall <julia.law...@lip6.fr> wrote: >> > >> > >> > On Sat, 16

Re: [Outreachy kernel] [PATCH] Staging: dgnc: Remove unused variables from structure definition

2017-09-16 Thread Srishti Sharma
On Sat, Sep 16, 2017 at 5:20 PM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sat, 16 Sep 2017, Srishti Sharma wrote: > >> Some variables in the structure were unused and hence them and >> the comments associated with them can be removed. > > How did you

[PATCH] Staging: dgnc: Remove unused variables from structure definition

2017-09-16 Thread Srishti Sharma
Some variables in the structure were unused and hence them and the comments associated with them can be removed. Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/dgnc/dgnc_driver.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/stagin

[PATCH] Staging: irda: Use !x instead of NULL comparison

2017-09-16 Thread Srishti Sharma
) S | -if(E==NULL) +if(!E) S ) Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/irda/net/discovery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/irda/net/discovery.c b/drivers/staging/irda/net/discovery.c index 3

Re: [Outreachy kernel] [PATCH v2] Staging: irda: Don't use assignment inside if statement

2017-09-15 Thread Srishti Sharma
On Sat, Sep 16, 2017 at 2:39 AM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sat, 16 Sep 2017, Srishti Sharma wrote: > >> On Sat, Sep 16, 2017 at 1:30 AM, Julia Lawall <julia.law...@lip6.fr> wrote: >> > >> > >> > On Sat, 16 Se

Re: [Outreachy kernel] [PATCH v2] Staging: irda: Don't use assignment inside if statement

2017-09-15 Thread Srishti Sharma
On Sat, Sep 16, 2017 at 1:30 AM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sat, 16 Sep 2017, Srishti Sharma wrote: > >> Write assignment statement outside the if statement. Done using >> the following semantic patch by coccinelle. >> >> @@ >&g

[PATCH 2/2] Staging: irda: Remove parentheses on the right of assignment

2017-09-15 Thread Srishti Sharma
Parentheses are not needed on the right hand side of assignment statement in most cases. Done using the following semantic patch by coccinelle. @@ identifier E,F,G,f; expression e,r; @@ ( E = (G == F); | E = (e == r); | E = -( ... -) ; ) Signed-off-by: Srishti Sharma <srishtis...@gmail.

[PATCH 1/2] Staging: irda: Don't use assignment inside if statement

2017-09-15 Thread Srishti Sharma
Write assignment statement outside of the if statement. Done using the following semantic patch by coccinelle. @@ identifier E; expression F; statement S; @@ -if((E = F)) +E = F; +if(E) S Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/irda/drivers/irda-usb

[PATCH 0/2] Assign outside if

2017-09-15 Thread Srishti Sharma
This patch series intends to remove the assignment statements inside the if statement, and eliminates the cases of parentheses around the right hand side of assignment generated as a result of the same. Srishti Sharma (2): Staging: irda: Don't use assignment inside if statement Staging

[PATCH v2] Staging: irda: Don't use assignment inside if statement

2017-09-15 Thread Srishti Sharma
Write assignment statement outside the if statement. Done using the following semantic patch by coccinelle. @@ identifier E; expression F; statement S; @@ -if((E = F)) +E = F; +if(E) S Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v2: -Semicolon was missing

Re: [Outreachy kernel] [PATCH] Staging: irda: Don't use assignment inside if statement

2017-09-15 Thread Srishti Sharma
On Sat, Sep 16, 2017 at 1:08 AM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sat, 16 Sep 2017, Srishti Sharma wrote: > >> Write assignment statement outside the if statement. Done using >> the following semantic patch by coccinelle. >> >> @@ >&g

Re: [PATCH] Staging: irda: Don't use assignment inside if statement

2017-09-15 Thread Srishti Sharma
On Sat, Sep 16, 2017 at 1:03 AM, Srishti Sharma <srishtis...@gmail.com> wrote: > Write assignment statement outside the if statement. Done using > the following semantic patch by coccinelle. > > @@ > identifier E; > expression F; > statement S; > @@ > >

[PATCH] Staging: irda: Don't use assignment inside if statement

2017-09-15 Thread Srishti Sharma
Write assignment statement outside the if statement. Done using the following semantic patch by coccinelle. @@ identifier E; expression F; statement S; @@ -if((E = F)) +E = F +if(E) S Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/irda/drivers/irda-usb

[PATCH v2] Staging: ccree: Use kcalloc instead of kzalloc

2017-09-14 Thread Srishti Sharma
Use kcalloc instead of kzalloc to check for overflow before multiplication. Done using the following semantic patch by coccinelle. http://coccinelle.lip6.fr/rules/kzalloc.cocci Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v2: - eliminate parentheses around the

[PATCH] Staging: ccree: Use kcalloc instead of kzalloc

2017-09-14 Thread Srishti Sharma
Use kcalloc instead of kzalloc to check for overflow before multiplication. Done using the following semantic patch by coccinelle. http://coccinelle.lip6.fr/rules/kzalloc.cocci Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/ccree/ssi_sysfs.c | 2 +- 1 file chan

[PATCH] Staging: lustre: obdclass: Use kcalloc instead of kzalloc

2017-09-14 Thread Srishti Sharma
Use kcalloc instead of kzalloc to check for overflow before multiplication. Done using the following semantic patch by coccinelle. http://coccinelle.lip6.fr/rules/kzalloc.cocci Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/lustre/lustre/obdclass/cl_object.c | 2

[PATCH] Staging: media: atomisp: Use kcalloc instead of kzalloc

2017-09-14 Thread Srishti Sharma
Use kcalloc instead of kzalloc to check for an overflow before multiplication. Done using the following semantic patch by coccinelle. http://coccinelle.lip6.fr/rules/kzalloc.cocci Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/media/atomisp/pci/atomisp2/c

[PATCH] Staging: media: atomisp: Merge assignment with return

2017-09-12 Thread Srishti Sharma
Merge the assignment and the return statements to return the value directly. Done using the following semantic patch by coccinelle. @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging

[PATCH] Staging: media: atomisp: Merge assignment with return

2017-09-12 Thread Srishti Sharma
Merge the assignment and the return statements to return the value directly. Done using the following semantic patch by coccinelle. @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging

Re: [PATCH] Staging: ccree: Don't use volatile for monitor_lock

2017-09-12 Thread Srishti Sharma
On Tue, Sep 12, 2017 at 2:49 PM, Dan Carpenter <dan.carpen...@oracle.com> wrote: > On Mon, Sep 11, 2017 at 09:29:31PM +0530, Srishti Sharma wrote: >> The use of volatile for the variable monitor_lock is unnecessary. >> >> Signed-off-by: Srishti Sharma <srishtis...

Re: [PATCH v2] Staging: ccree: Prefer using BIT macro.

2017-09-11 Thread Srishti Sharma
On Mon, Sep 11, 2017 at 9:54 PM, Greg KH <gre...@linuxfoundation.org> wrote: > On Thu, Sep 07, 2017 at 07:44:52PM +0530, Srishti Sharma wrote: >> Use BIT(x) instead of using (1<<x), reported by checkpatch.pl. >> >> Signed-off-by: Srishti Sharma <srishtis..

Re: [Outreachy kernel] Re: [PATCH] Staging: ccree: Don't use volatile for monitor_lock

2017-09-11 Thread Srishti Sharma
On Mon, Sep 11, 2017 at 9:45 PM, Srishti Sharma <srishtis...@gmail.com> wrote: > On Mon, Sep 11, 2017 at 9:41 PM, Julia Lawall <julia.law...@lip6.fr> wrote: >> >> >> On Mon, 11 Sep 2017, Srishti Sharma wrote: >> >>> On Mon, Sep 11, 2017 at 9:3

[PATCH v2] Staging: ccree: Remove unused variable monitor_lock

2017-09-11 Thread Srishti Sharma
Remove the variable monitor_lock as it is not used anywhere. Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v2: -The variable that was not to be declared as volatile can be eliminated as it is not being used anywhere. drivers/staging/ccree/ssi_request_mgr.c |

Re: [Outreachy kernel] Re: [PATCH] Staging: ccree: Don't use volatile for monitor_lock

2017-09-11 Thread Srishti Sharma
On Mon, Sep 11, 2017 at 9:41 PM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Mon, 11 Sep 2017, Srishti Sharma wrote: > >> On Mon, Sep 11, 2017 at 9:34 PM, Greg KH <gre...@linuxfoundation.org> wrote: >> > On Mon, Sep 11, 2017 at 09:29:31PM +05

Re: [PATCH] Staging: ccree: Don't use volatile for monitor_lock

2017-09-11 Thread Srishti Sharma
On Mon, Sep 11, 2017 at 9:34 PM, Greg KH <gre...@linuxfoundation.org> wrote: > On Mon, Sep 11, 2017 at 09:29:31PM +0530, Srishti Sharma wrote: >> The use of volatile for the variable monitor_lock is unnecessary. >> >> Signed-off-by: Srishti Sharma <srishtis...@gmail.c

[PATCH] Staging: ccree: Don't use volatile for monitor_lock

2017-09-11 Thread Srishti Sharma
The use of volatile for the variable monitor_lock is unnecessary. Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/ccree/ssi_request_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ccree/ssi_request_mgr.c b/drivers/staging

[PATCH] Staging: rtl8712: Remove multiple blank lines

2017-09-11 Thread Srishti Sharma
Remove extra blank line. Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/rtl8712/rtl8712_event.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8712/rtl8712_event.h b/drivers/staging/rtl8712/rtl8712_event.h index b383740..cad7085

[PATCH] Staging: xgifb: XGI_main_26.c: Fix alignment to match parentheses

2017-09-10 Thread Srishti Sharma
Fix alignment so that it matches open parentheses. Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/xgifb/XGI_main_26.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_mai

Re: [Outreachy kernel] [PATCH] Staging: ccree: Merge assignment with return

2017-09-09 Thread Srishti Sharma
On Sat, Sep 9, 2017 at 10:29 PM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sat, 9 Sep 2017, Srishti Sharma wrote: > >> Merge the assignment and return statements to return the value >> directly. Done using coccinelle. > > Coccinelle is not always p

[PATCH v2] Staging: ccree: Merge assignment with return

2017-09-09 Thread Srishti Sharma
Merge the assignment and return statements to return the value directly. Done using the following semantic patch by coccinelle. @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v2: -C

[PATCH] Staging: ccree: Merge assignment with return

2017-09-09 Thread Srishti Sharma
Merge the assignment and return statements to return the value directly. Done using coccinelle. @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/ccree/ssi_sysfs.c | 4 +--- 1 file c

Re: [Outreachy kernel] [PATCH v3] Staging: ccree: Merge assignment with return

2017-09-09 Thread Srishti Sharma
On Sat, Sep 9, 2017 at 12:26 PM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sat, 9 Sep 2017, Srishti Sharma wrote: > >> Merge the assignment and return statements to return the value >> directly. Done using coccinelle. >> >> @@ >> local ide

[PATCH v4] Staging: ccree: Merge assignment with return

2017-09-09 Thread Srishti Sharma
Merge the assignment and the return statements to return the value directly. Done using coccinelle. @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v4: -Edit commit message so that it re

Re: [Outreachy kernel] [PATCH v2] Staging: ccree: Merge assignment with return

2017-09-09 Thread Srishti Sharma
On Sat, Sep 9, 2017 at 12:27 PM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sat, 9 Sep 2017, Srishti Sharma wrote: > >> On Sat, Sep 9, 2017 at 2:28 AM, Julia Lawall <julia.law...@lip6.fr> wrote: >> > >> > >> > On Sat, 9 Sep 20

[PATCH v3] Staging: ccree: Merge assignment with return

2017-09-08 Thread Srishti Sharma
Merge the assignment and return statements to return the value directly. Done using coccinelle. @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v3: -Edit commit message so that it respe

Re: [Outreachy kernel] [PATCH v2] Staging: ccree: Merge assignment with return

2017-09-08 Thread Srishti Sharma
On Sat, Sep 9, 2017 at 2:28 AM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sat, 9 Sep 2017, Srishti Sharma wrote: > >> Merge the assignment and return statements to return the value >> directly. Done using coccinelle. >> >> @@ >> local ide

[PATCH v2] Staging: ccree: Merge assignment with return

2017-09-08 Thread Srishti Sharma
Merge the assignment and return statements to return the value directly. Done using coccinelle. @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v2: - Edit commit message so that it re

Re: [Outreachy kernel] [PATCH] Staging: ccree: Merge assignment with return

2017-09-08 Thread Srishti Sharma
On Sat, Sep 9, 2017 at 1:42 AM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sat, 9 Sep 2017, Srishti Sharma wrote: > >> Return the return value of a function directly, instead of first saving it >> in a variable and then returning it. This change was mad

[PATCH] Staging: ccree: Merge assignment with return

2017-09-08 Thread Srishti Sharma
Return the return value of a function directly, instead of first saving it in a variable and then returning it. This change was made using the following semantic patch by coccinelle. @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Srishti Sharma

Re: [Outreachy kernel] [PATCH] Staging: media: imx: Prefer using BIT macro

2017-09-08 Thread Srishti Sharma
On Fri, Sep 8, 2017 at 8:59 PM, Sean Paul <seanp...@chromium.org> wrote: > On Fri, Sep 8, 2017 at 11:11 AM, Srishti Sharma <srishtis...@gmail.com> wrote: >> Use BIT(x) instead of (1<<x). >> >> Signed-off-by: Srishti Sharma <srishtis...@gmail.com> >

[PATCH] Staging: media: imx: Prefer using BIT macro

2017-09-08 Thread Srishti Sharma
Use BIT(x) instead of (1<<x). Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/media/imx/imx-media.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/media/imx/imx-media.h b/drivers/staging/media/imx/imx-m

Re: [PATCH] Staging: media: omap4iss: Use WARN_ON() instead of BUG_ON().

2017-09-08 Thread Srishti Sharma
On Fri, Sep 8, 2017 at 8:08 PM, Dan Carpenter <dan.carpen...@oracle.com> wrote: > On Fri, Sep 08, 2017 at 07:38:18PM +0530, Srishti Sharma wrote: >> Use WARN_ON() instead of BUG_ON() to avoid crashing the kernel. >> >> Signed-off-by: Srishti Sharma <srishtis...

Re: [Outreachy kernel] [PATCH] Staging: media: omap4iss: Use WARN_ON() instead of BUG_ON().

2017-09-08 Thread Srishti Sharma
On Fri, Sep 8, 2017 at 7:40 PM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Fri, 8 Sep 2017, Srishti Sharma wrote: > >> Use WARN_ON() instead of BUG_ON() to avoid crashing the kernel. >> >> Signed-off-by: Srishti Sharma <srishtis...@gmail.com>

[PATCH] Staging: media: omap4iss: Use WARN_ON() instead of BUG_ON().

2017-09-08 Thread Srishti Sharma
Use WARN_ON() instead of BUG_ON() to avoid crashing the kernel. Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/media/omap4iss/iss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging

[PATCH v2] Staging: ccree: Prefer using BIT macro.

2017-09-07 Thread Srishti Sharma
Use BIT(x) instead of using (1<<x), reported by checkpatch.pl. Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v2: - Add tab spaces before BIT macro. drivers/staging/ccree/ssi_cipher.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --g

[PATCH] Staging: ccree: Prefer using BIT macro.

2017-09-07 Thread Srishti Sharma
Use BIT(x) instead of (1<<x), reported by checkpatch.pl. Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- drivers/staging/ccree/ssi_cipher.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/ccree/ssi_cipher.h b/drivers/s

Re: [PATCH v5] Staging: ccree: Remove unused variable.

2017-09-07 Thread Srishti Sharma
On Thu, Sep 7, 2017 at 2:20 PM, Gilad Ben-Yossef <gi...@benyossef.com> wrote: > Hi, > > On Thu, Sep 7, 2017 at 10:49 AM, Srishti Sharma <srishtis...@gmail.com> wrote: >> Remove the local variable inflight_counter as it is never used. >> >> Signed-off-by

[PATCH v5] Staging: ccree: Remove unused variable.

2017-09-07 Thread Srishti Sharma
Remove the local variable inflight_counter as it is never used. Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v5: - Correct the format of the subject. drivers/staging/ccree/ssi_cipher.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging

Re: [Outreachy kernel] [PATCH v4] Staging: ccree: ssi_cipher.c: Remove unused variable.

2017-09-07 Thread Srishti Sharma
thers have done. It is not really > possible to guess correctly. However, one does not generally include the > extension on a filename. > Yes, they have not used the filename in the subject line . So I'll change it to the required format . Thanks , Srishti > julia > > On Thu, 7 Sep 2017,

[PATCH v4] Staging: ccree: ssi_cipher.c: Remove unused variable.

2017-09-06 Thread Srishti Sharma
Remove local variable inflight_counter, as it is never used. Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Change in v4: -There is no longer a need to make the comment more comprehensible, as I have deleted the variable associated with it. The v3 of this patch was not

Re: [PATCH v3] Staging: ccree: ssi_cipher.c: Remove unused variable.

2017-09-06 Thread Srishti Sharma
u and everyone's trying to be nice about it but > patches are fundamentally points of disagreement and that's stress. > > regards, > dan carpenter > Thanks , I'll be more careful ! Regards, Srishti ___ devel mailing list de...@linuxdriverprojec

Re: [Outreachy kernel] [PATCH v3] Staging: ccree: ssi_cipher.c: Remove unused variable.

2017-09-06 Thread Srishti Sharma
On Thu, Sep 7, 2017 at 2:56 AM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Thu, 7 Sep 2017, Srishti Sharma wrote: > >> On Thu, Sep 7, 2017 at 2:47 AM, Julia Lawall <julia.law...@lip6.fr> wrote: >> > >> > >> > On Thu, 7 Sep 201

Re: [Outreachy kernel] [PATCH v3] Staging: ccree: ssi_cipher.c: Remove unused variable.

2017-09-06 Thread Srishti Sharma
On Thu, Sep 7, 2017 at 2:47 AM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Thu, 7 Sep 2017, Srishti Sharma wrote: > >> Remove local variable inflight_counter ,as it is never used. > > "counter ,as" -> "counter, as" >

[PATCH v3] Staging: ccree: ssi_cipher.c: Remove unused variable.

2017-09-06 Thread Srishti Sharma
Remove local variable inflight_counter ,as it is never used. Signed-off-by: Srishti Sharma <srishtis...@gmail.com> --- Changes in v3: - There was no longer a need to make the comment more comprehensible as I have deleted the variable associated with it because it is unused . drivers/s

Re: [PATCH] Staging: ccree: ssi_cipher.c: Correct spelling mistake.

2017-09-06 Thread Srishti Sharma
On Thu, Sep 7, 2017 at 2:29 AM, Dan Carpenter <dan.carpen...@oracle.com> wrote: > On Thu, Sep 07, 2017 at 12:54:23AM +0530, Srishti Sharma wrote: >> Correct spelling of counter in comment . >> >> Signed-off-by: Srishti Sharma <srishtis...@gmail.com> >> ---

  1   2   >