Re: [PATCH] staging: iio: ad7192: Use the dedicated reset function

2017-09-16 Thread Jonathan Cameron
On Sat, 16 Sep 2017 15:22:23 -0700 Jonathan Cameron wrote: > On Thu, 14 Sep 2017 16:31:06 +0200 > Michael Hennerich wrote: > > > On 14.09.2017 15:50, Stefan Popa wrote: > > > SPI host drivers can use DMA to transfer data, so the buffer should be > > > properly allocated. > > > Keeping it on

Re: [PATCH] staging: iio: ad7192: Use the dedicated reset function

2017-09-16 Thread Jonathan Cameron
On Thu, 14 Sep 2017 16:31:06 +0200 Michael Hennerich wrote: > On 14.09.2017 15:50, Stefan Popa wrote: > > SPI host drivers can use DMA to transfer data, so the buffer should be > > properly allocated. > > Keeping it on the stack could cause an undefined behavior. > > > > The dedicated reset fun

Re: [PATCH v2] staging: iio: tsl2x7x: clean up limit checks

2017-09-16 Thread Jonathan Cameron
On Sat, 16 Sep 2017 14:18:52 +0200 Paolo Cretaro wrote: > On 16/09/2017 13:37, Dan Carpenter wrote: > > On Sat, Sep 16, 2017 at 01:11:29PM +0200, Paolo Cretaro wrote: > >> Hi Dan, > >> just minor nitpicking on the commit message: > >> > >> On 08/09/2017 12:53, Dan Carpenter wrote: > >>> The b

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

2017-09-16 Thread Julia Lawall
On Sat, 16 Sep 2017, Srishti Sharma wrote: > Eliminate the fields that are not used and the comments > associated with them. > > Signed-off-by: Srishti Sharma Acked-by: Julia Lawall > --- > Changes in v2: > - Use the word field instead of variable. > > drivers/staging/dgnc/dgnc_driver.h |

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

2017-09-16 Thread Julia Lawall
On Sat, 16 Sep 2017, Srishti Sharma wrote: > Remove unused fields and comments associated with them in > the structure definition. > > Signed-off-by: Srishti Sharma Acked-by: Julia Lawall > --- > Changes in v2: > - Use the word field instead of variable. > > drivers/staging/dgnc/dgnc_drive

[PATCH] staging: fbtft: remove redundant initialization of txbuf16

2017-09-16 Thread Colin King
From: Colin Ian King txbuf16 is being initialized at declaration time and then later set to another value without it being read inbetween, hence making the initialization redundant. Fix this by setting txbuf16 just the once. Also clean up some incorrect indentations. Cleans up clang build warnin

[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 --- Changes in v2: - Use the word field instead of variable. drivers/staging/dgnc/dgnc_driver.h | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/staging/dgnc/dgn

[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 --- 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/drivers/staging/dgnc/dgnc_driver.

[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] staging: ccree: remove unused and redundant variable idx

2017-09-16 Thread Colin King
From: Colin Ian King Variable idx is being set but never read and thus it can be removed because it is redundant. Cleans up clang build warnings: warning: Value stored to 'idx' during its initialization is never read warning: Value stored to 'idx' is never read warning: Value stored to 'idx' is

Re: [Outreachy kernel] [PATCH 0/2] Remove unused variables in structure definition

2017-09-16 Thread Julia Lawall
On Sat, 16 Sep 2017, Srishti Sharma wrote: > This patch series attempts to remove unused variables in structure > variables and the comments associated with them. Actually, I would say that a structure has fields, not variables. julia > > Srishti Sharma (2): > Staging: dgnc: Remove unused v

[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 --- drivers/staging/dgnc/dgnc_driver.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/staging/dgnc/dgnc_driver.h index 5d2566e..0

[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 --- drivers/staging/dgnc/dgnc_driver.h | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/staging/dgnc/dgnc_driver.h index 7

[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 wrote: > > > On Sat, 16 Sep 2017, Srishti Sharma wrote: > >> On Sat, Sep 16, 2017 at 5:20 PM, Julia Lawall wrote: >> > >> > >> > On Sat, 16 Sep 2017, Srishti Sharma wrote: >> > >> >> Some variables in the structure were unused and hence them and >> >>

Re: [PATCH v2] staging: iio: tsl2x7x: clean up limit checks

2017-09-16 Thread Paolo Cretaro
On 16/09/2017 13:37, Dan Carpenter wrote: > On Sat, Sep 16, 2017 at 01:11:29PM +0200, Paolo Cretaro wrote: >> Hi Dan, >> just minor nitpicking on the commit message: >> >> On 08/09/2017 12:53, Dan Carpenter wrote: >>> The background of this code is that we can either use the default >>> tables or l

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

2017-09-16 Thread Julia Lawall
On Sat, 16 Sep 2017, Srishti Sharma wrote: > On Sat, Sep 16, 2017 at 5:20 PM, Julia Lawall 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

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 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 find these? The last two can easily be checked with grep,

Re: [PATCH v2] staging: iio: tsl2x7x: clean up limit checks

2017-09-16 Thread Paolo Cretaro
Hi Dan, just minor nitpicking on the commit message: On 08/09/2017 12:53, Dan Carpenter wrote: > The background of this code is that we can either use the default > tables or load our own table with sysfs. The default tables are three > element arrays of struct tsl2x7x_lux. If we load the table

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

2017-09-16 Thread Julia Lawall
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 find these? The last two can easily be checked with grep, but that is ont the case for type. Actually there are two struc

[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 --- drivers/staging/dgnc/dgnc_driver.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.h b/drivers/stagi

Re: [PATCH v2] staging: iio: tsl2x7x: clean up limit checks

2017-09-16 Thread Dan Carpenter
On Sat, Sep 16, 2017 at 01:11:29PM +0200, Paolo Cretaro wrote: > Hi Dan, > just minor nitpicking on the commit message: > > On 08/09/2017 12:53, Dan Carpenter wrote: > > The background of this code is that we can either use the default > > tables or load our own table with sysfs. The default tabl

Re: [Outreachy kernel] [PATCH] staging: lustre: lnet: Replace list_for_each with list_for_each_entry

2017-09-16 Thread Julia Lawall
On Fri, 15 Sep 2017, Haneen Mohammed wrote: > Replace use of the combination of list_for_each and list_entry > with list_for_each_entry to simplify the code and remove variables > that are used only in list_for_each. > Issue found and corrected using Coccinelle script: > > @r@ > expression head,

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

2017-09-16 Thread Julia Lawall
On Sat, 16 Sep 2017, Srishti Sharma wrote: > Test for NULL as !x where functions that return NULL on failure > are used. Done using the following semantic patch by coccinelle. > > @ is_null @ > expression E; > statement S; > @@ > > E = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\| > us