[PATCH] staging: rtl8723bs: hal: Remove NULL check before kfree

2020-03-26 Thread Simran Singhal
NULL check before kfree is unnecessary so remove it. The following Coccinelle script was used to detect this: @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; Signed-off-by: Simran Singhal

[PATCH] staging: rtl8723bs: hal: Remove unnecessary cast on void pointer

2020-03-26 Thread Simran Singhal
Assignment to a typed pointer is sufficient in C. No cast is needed. 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/stag

[PATCH] staging: rtl8723bs: Clean up tests if NULL returned on failure

2020-03-25 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: rtl8723bs: hal: Compress return logic

2020-03-25 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/rtl8723bs/hal/hal_com_phycfg.c | 4 +--- 1 file changed, 1

[PATCH] staging: rtl8723bs: rtw_cmd: Compress lines for immediate return

2020-03-25 Thread Simran Singhal
= +return f(...); -return ret; Signed-off-by: Simran Singhal --- drivers/staging/rtl8723bs/core/rtw_cmd.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c index 744b40dd4cf0..42b0ea8abd9c

[PATCH] staging: rtl8723bs: rtw_efuse: Compress lines for immediate return

2020-03-25 Thread Simran Singhal
Compress two lines into a single line if immediate return statement is found. It is done using script Coccinelle. And coccinelle uses following semantic patch for this compression function: @@ expression ret; identifier f; @@ -ret = +return f(...); -return ret; Signed-off-by: Simran

[PATCH] staging: rtl8723bs: Remove blank line before '}' brace

2020-03-25 Thread Simran Singhal
Remove unneeded blank line before a close brace '}'. Issue found by checkpatch.pl: CHECK: Blank lines aren't necessary before a close brace '}' Signed-off-by: Simran Singhal --- drivers/staging/rtl8723bs/core/rtw_security.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers

[PATCH] staging: rtl8723bs: Add line after variable declarations

2020-03-25 Thread Simran Singhal
Add whiteline after variable declarations to remove the checkpatch.pl warning: WARNING: Missing a blank line after declarations Signed-off-by: Simran Singhal --- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/staging

[PATCH] staging: rtl8723bs: Remove multiple assignments

2020-03-25 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/rtl8723bs/core/rtw_cmd.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH] staging: rtl8723bs: Remove unnecessary braces for single statements

2020-03-25 Thread Simran Singhal
Clean up unnecessary braces around single statement blocks. Issues reported by checkpatch.pl as: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Simran Singhal --- drivers/staging/rtl8723bs/core/rtw_efuse.c | 9 +++-- 1 file changed, 3 insertions(+), 6

[PATCH v2] staging: kpc2000: Removing a blank line

2020-03-25 Thread Simran Singhal
This patch fixes the checkpatch warning by removing a blank line. CHECK: Please don't use multiple blank lines Signed-off-by: Simran Singhal --- Changes in v2: - Make the subject and commit message correct by mentioning that this patch specifically removes a blank line. drivers/staging

[PATCH] staging: rtl8723bs: Remove comparisons to NULL in conditionals

2020-03-22 Thread Simran Singhal
Remove comparisons to NULL in conditionals in drivers/staging/rtl8723bs/core/rtw_ap.c Issues reported by checkpatch.pl as: CHECK: Comparison to NULL could be written Signed-off-by: Simran Singhal --- drivers/staging/rtl8723bs/core/rtw_ap.c | 30 - 1 file changed, 15

[PATCH] staging: greybus: tools: Fix braces {} style

2020-03-22 Thread Simran Singhal
This patch fixes the check reported by checkpatch.pl for braces {} should be used on all arms of this statement. Signed-off-by: Simran Singhal --- drivers/staging/greybus/tools/loopback_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/greybus/tools

[PATCH] staging: kpc2000: Removing multiple blank lines

2020-03-21 Thread Simran Singhal
This patch fixes the checkpatch warning by removing multiple blank lines. CHECK: Please don't use multiple blank lines Signed-off-by: Simran Singhal --- drivers/staging/kpc2000/kpc2000/pcie.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/kpc2000/kpc2000/pcie.h b/drivers

Re: [Outreachy kernel] Re: [PATCH] staging: irda: Replace printk() with appropriate net_*macro_ratelimited()

2018-03-06 Thread SIMRAN SINGHAL
On Tue, Mar 6, 2018 at 2:33 AM, Julia Lawall wrote: > > > On Mon, 5 Mar 2018, Arushi Singhal wrote: > >> >> >> On Mon, Mar 5, 2018 at 3:33 PM, Dan Carpenter >> wrote: >> On Mon, Mar 05, 2018 at 04:02:06AM +0530, Arushi Singhal wrote: >>

[PATCH] staging: rtl8192u: ieee80211: Convert printks to pr_

2017-06-21 Thread simran singhal
Use the current logging style. Coalesce formats where appropriate. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 34 ++- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/drivers/staging/rt

[PATCH] staging: lustre: lnet: selftest: Change the type of variable to bool

2017-06-20 Thread simran singhal
This patch changes the type of variable done from int to boolean. As it is been used as a boolean in the function sfw_test_rpc_done(). It also makes the code more readable and bool data type also requires less memory in comparison to int data type. Signed-off-by: simran singhal <singhals

[PATCH] staging: rtl8723bs: hal: Use (true/false) in assignment to bool

2017-06-19 Thread simran singhal
This patch assigns (true/false) to boolean EDCCA_State instead of (1/0). And, there is no need of comparing EDCCA_State explicitly with constant 1. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/rtl8723bs/hal/odm_DIG.c | 8 1 file changed, 4 inse

[PATCH] staging: sm750fb: Remove typedefs from _logical_chip_type_t and _clock_type_t

2017-06-19 Thread Simran Singhal
This patch removes typedefs from enum _logical_chip_type_t and enum _clock_type_t and rename them to logical_chip_type_t and clock_type_t respectively. Fix checkpatch warning: WARNING: do not add new typedefs Signed-off-by: Simran Singhal <singhalsimr...@gmail.com> --- drivers/staging/s

[PATCH] staging: iio: light: constify attribute_group structures

2017-03-31 Thread simran singhal
: textdata bss dec hex filename 151921400 0 1659240d0 drivers/staging/iio/light/tsl2x7x_core.o Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/light/tsl2x7x_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 1/3] staging: iio: accel: Remove useless type conversion

2017-03-31 Thread simran singhal
Some type conversions like casting a pointer to a pointer of same type, casting to the original type using addressof(&) operator etc. are not needed. Therefore, remove them. Done using coccinelle: @@ type t; t *p; t a; @@ ( - (t)(a) + a | - (t *)(p) + p | - (t *)() + ) Signed-off-by: si

[PATCH 2/3] staging: iio: frequency: Remove useless type conversion

2017-03-31 Thread simran singhal
Some type conversions like casting a pointer to a pointer of same type, casting to the original type using addressof(&) operator etc. are not needed. Therefore, remove them. Done using coccinelle: @@ type t; t *p; t a; @@ ( - (t)(a) + a | - (t *)(p) + p | - (t *)() + ) Signed-off-by: si

[PATCH 3/3] staging: iio: light: Remove useless type conversion

2017-03-31 Thread simran singhal
Some type conversions like casting a pointer to a pointer of same type, casting to the original type using addressof(&) operator etc. are not needed. Therefore, remove them. Done using coccinelle: @@ type t; t *p; t a; @@ ( - (t)(a) + a | - (t *)(p) + p | - (t *)() + ) Signed-off-by: si

[PATCH 0/3] staging: iio: Remove useless type conversion

2017-03-31 Thread simran singhal
This patch-series removes some type conversions like casting a pointer to a pointer of same type, casting to the original type using addressof(&) operator etc. simran singhal (3): staging: iio: accel: Remove useless type conversion staging: iio: frequency: Remove useless type conver

[PATCH v2] iio: gyro: adis16060: Change the name of function.

2017-03-31 Thread simran singhal
Change the name of function from adis16060_spi_write_than_read() to adis16060_spi_write_then_read(). change "than" to "then" as its time depended. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- v2: -Change the subject. -Add signed-off-by.

Re: [Outreachy kernel] [PATCH v4] staging: iio: ade7753: Replace mlock with driver private lock

2017-03-30 Thread SIMRAN SINGHAL
On Fri, Mar 31, 2017 at 1:18 AM, Jonathan Cameron <ji...@jic23.retrosnub.co.uk> wrote: > > > On 30 March 2017 19:44:26 BST, SIMRAN SINGHAL <singhalsimr...@gmail.com> > wrote: >>On Fri, Mar 31, 2017 at 12:02 AM, Jonathan Cameron <ji...@kernel.org> >>wrot

[PATCH] iio: gyro: adis16060: Change the function's name

2017-03-30 Thread simran singhal
Change the name of function from adis16060_spi_write_than_read() to adis16060_spi_write_then_read(). change "than" to "then" as its time depended. --- drivers/staging/iio/gyro/adis16060_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [Outreachy kernel] [PATCH v4] staging: iio: ade7753: Replace mlock with driver private lock

2017-03-30 Thread SIMRAN SINGHAL
On Fri, Mar 31, 2017 at 12:02 AM, Jonathan Cameron <ji...@kernel.org> wrote: > On 28/03/17 19:37, Alison Schofield wrote: >> On Tue, Mar 28, 2017 at 10:55:17PM +0530, SIMRAN SINGHAL wrote: >>> On Fri, Mar 24, 2017 at 12:51 AM, Alison Schofield <amsfiel...@gmail.com>

Re: [Outreachy kernel] [PATCH v4] staging: iio: ade7753: Replace mlock with driver private lock

2017-03-28 Thread SIMRAN SINGHAL
On Fri, Mar 24, 2017 at 12:51 AM, Alison Schofield <amsfiel...@gmail.com> wrote: > On Fri, Mar 24, 2017 at 12:05:20AM +0530, simran singhal wrote: >> The IIO subsystem is redefining iio_dev->mlock to be used by >> the IIO core only for protecting device operating mode

Re: [PATCH v9] staging: iio: adis16060: Remove iio_dev mlock and refactor code

2017-03-25 Thread SIMRAN SINGHAL
On Sat, Mar 25, 2017 at 11:16 PM, Jonathan Cameron <ji...@kernel.org> wrote: > On 23/03/17 09:20, simran singhal wrote: >> The IIO subsystem is redefining iio_dev->mlock to be used by >> the IIO core only for protecting device operating mode changes. >> ie. Cha

[PATCH v4] staging: iio: ade7753: Replace mlock with driver private lock

2017-03-23 Thread simran singhal
ces global data. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- v4: -Add mutex_init drivers/staging/iio/meter/ade7753.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/staging/iio/meter/ade7753.c b/drivers/staging/iio/meter/ade775

Re: [PATCH v3 2/2] staging: iio: ade7753: Replace mlock with driver private lock

2017-03-23 Thread SIMRAN SINGHAL
On Thu, Mar 23, 2017 at 1:55 AM, Jonathan Cameron <ji...@kernel.org> wrote: > On 21/03/17 18:03, simran singhal wrote: >> The IIO subsystem is redefining iio_dev->mlock to be used by >> the IIO core only for protecting device operating mode changes. >> ie. Cha

[PATCH v9] staging: iio: adis16060: Remove iio_dev mlock and refactor code

2017-03-23 Thread simran singhal
ing is removed. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- v9: -Change the name of function from adis16060_spi_write_than_read() to adis16060_spi_write_then_read(). change "than" to "then" as its time depended. -Add mutex_unloc

[PATCH v8] staging: adis16060: Remove iio_dev mlock and refactor code

2017-03-22 Thread simran singhal
reads. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- v8: -change subject -change commit message v7: -Change subject -Remove lock from read_raw instead from function adis16060_spi_write_than_read(). v6: -Change commit message -Remove nested lock v5:

Re: [Outreachy kernel] [PATCH v6] staging: Use buf_lock instead of mlock and Refactor code

2017-03-21 Thread SIMRAN SINGHAL
On Tue, Mar 21, 2017 at 10:18 PM, Alison Schofield <amsfiel...@gmail.com> wrote: > On Mon, Mar 20, 2017 at 01:36:21AM +0530, simran singhal wrote: > > Hi Simran, > > I going to ask for a v7 without looking at the code ;) > Subject line needs subsystem and driver. >

[PATCH v3 2/2] staging: iio: ade7753: Replace mlock with driver private lock

2017-03-21 Thread simran singhal
ces global data. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/meter/ade7753.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/iio/meter/ade7753.c b/drivers/staging/iio/meter/ade7753.c index b71fbd3..9674e

[PATCH v3 1/2] staging: iio: ade7753: Remove trailing whitespaces

2017-03-21 Thread simran singhal
This patch removes trailing whitespaces in order to follow the Linux coding style. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/meter/ade7753.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/iio/meter/ade775

[PATCH v3 0/2] Replace mlock with private lock and delete whitespaces

2017-03-21 Thread simran singhal
ing buf_lock instead of lock. simran singhal (2): staging: iio: ade7753: Remove trailing whitespaces staging: iio: ade7753: Replace mlock with driver private lock drivers/staging/iio/meter/ade7753.c | 14 -- 1 file changed, 8 insertions(+), 6 del

Re: [Outreachy kernel] [PATCH v6] staging: Use buf_lock instead of mlock and Refactor code

2017-03-21 Thread SIMRAN SINGHAL
On Tue, Mar 21, 2017 at 10:18 PM, Alison Schofield <amsfiel...@gmail.com> wrote: > On Mon, Mar 20, 2017 at 01:36:21AM +0530, simran singhal wrote: > > Hi Simran, > > I going to ask for a v7 without looking at the code ;) > Subject line needs subsystem and driver. >

Re: [PATCH v5] staging: Use buf_lock instead of mlock and Refactor code

2017-03-21 Thread SIMRAN SINGHAL
rove the system] > > url: > https://github.com/0day-ci/linux/commits/simran-singhal/staging-Use-buf_lock-instead-of-mlock-and-Refactor-code/20170321-213956 > base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg > config: x86_64-randconfig-x016-201712

[PATCH 2/2] staging: ade7754: Clean up #includes

2017-03-20 Thread simran singhal
Alphabetize and separate kernel and subsystem headers. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/meter/ade7754.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/staging/iio/meter/ade7754.c b/drivers/staging/iio

[PATCH 0/2] staging: iio: ade7754: Header file maintenance

2017-03-20 Thread simran singhal
Collapse header file into source, and clean up includes in implementation. simran singhal (2): staging: ade7754: Move header content to implementation file staging: ade7754: Clean up #includes drivers/staging/iio/meter/ade7754.c | 98 ++--- drivers/staging

[PATCH 1/2] staging: ade7754: Move header content to implementation file

2017-03-20 Thread simran singhal
The contents of ade7754.h are only used in ade7754.c. Move the header contents to the implementation file, and delete the header file. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/meter/ade7754.c | 87 ++- drivers/stagi

[PATCH v7] staging: adis16060_core: Replace mlock with buf_lock and refactor code

2017-03-20 Thread simran singhal
locks inside it being called. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- v7: -Change subject -Remove lock from read_raw instead of from function adis16060_spi_write_than_read(). drivers/staging/iio/gyro/adis16060_core.c | 38 +-- 1 file

Re: [Outreachy kernel] [PATCH v5] staging: Use buf_lock instead of mlock and Refactor code

2017-03-19 Thread SIMRAN SINGHAL
On Mon, Mar 20, 2017 at 2:13 AM, Jonathan Cameron <ji...@kernel.org> wrote: > On 19/03/17 17:14, Gargi Sharma wrote: >> On Sun, Mar 19, 2017 at 6:20 PM, simran singhal >> <singhalsimr...@gmail.com> wrote: >>> The IIO subsystem is redefining iio_dev->ml

[PATCH v6] staging: Use buf_lock instead of mlock and Refactor code

2017-03-19 Thread simran singhal
ved nested locks as the function adis16060_read_raw call a lock on >buf_lock and then calls the function adis16060_spi_write which again tries to get hold of the same lock. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- v6: -Change commit message -Remove nested lo

Re: [Outreachy kernel] [PATCH] staging: impedance-analyzer: ad5933: Remove unnecessary goto

2017-03-19 Thread SIMRAN SINGHAL
On Sun, Mar 19, 2017 at 11:26 PM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sun, 19 Mar 2017, simran singhal wrote: > >> Remove unnecessary goto. >> >> Signed-off-by: simran singhal <singhalsimr...@gmail.com> >> --- >>

[PATCH] staging: impedance-analyzer: ad5933: Remove unnecessary goto

2017-03-19 Thread simran singhal
Remove unnecessary goto. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/impedance-analyzer/ad5933.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/imp

[PATCH v5] staging: Use buf_lock instead of mlock and Refactor code

2017-03-19 Thread simran singhal
ned-off-by: simran singhal <singhalsimr...@gmail.com> --- v5: -Rename val in adis16060_spi_write_than_read() to conf. -Rename val2 in adis16060_spi_write_than_read() to val. -Corrected Checkpatch issues. -Removed goto from adis16060_read_raw(). drivers/staging

Re: [PATCH v4] staging: Use buf_lock instead of mlock and Refactor code

2017-03-19 Thread SIMRAN SINGHAL
On Sun, Mar 19, 2017 at 3:45 PM, Jonathan Cameron <ji...@kernel.org> wrote: > On 18/03/17 18:44, simran singhal wrote: >> The IIO subsystem is redefining iio_dev->mlock to be used by >> the IIO core only for protecting device operating mode changes. >> ie. Cha

Re: [Outreachy kernel] [PATCH v2] staging: iio: ade7753: replace mlock with driver private lock

2017-03-18 Thread SIMRAN SINGHAL
On Sat, Mar 18, 2017 at 11:51 PM, Jonathan Cameron <ji...@kernel.org> wrote: > On 18/03/17 17:34, SIMRAN SINGHAL wrote: >> On Thu, Mar 16, 2017 at 3:23 AM, Jonathan Cameron <ji...@kernel.org> wrote: >>> On 13/03/17 19:53, Alison Schofield wrote: >>>>

[PATCH v4] staging: Use buf_lock instead of mlock and Refactor code

2017-03-18 Thread simran singhal
ned-off-by: simran singhal <singhalsimr...@gmail.com> --- v4: -Refactored code -change commit subject -change commit message drivers/staging/iio/gyro/adis16060_core.c | 37 --- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/drivers/st

Re: [Outreachy kernel] [PATCH v2] staging: iio: ade7753: replace mlock with driver private lock

2017-03-18 Thread SIMRAN SINGHAL
On Thu, Mar 16, 2017 at 3:23 AM, Jonathan Cameron <ji...@kernel.org> wrote: > On 13/03/17 19:53, Alison Schofield wrote: >> On Mon, Mar 13, 2017 at 10:01:07PM +0530, simran singhal wrote: >>> The IIO subsystem is redefining iio_dev->mlock to be used by >>> the

[PATCH v3] staging: adis16060_core: Use private driver lock instead of mlock

2017-03-13 Thread simran singhal
ces global data. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- v3: -Removed new lock to reuse the existing lock drivers/staging/iio/gyro/adis16060_core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/iio/gyro/adis16060_

[PATCH v2] staging: iio: ade7753: replace mlock with driver private lock

2017-03-13 Thread simran singhal
ces global data. Fix some coding style issues related to white space also. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- v2: -Removed new lock to reuse the existing lock drivers/staging/iio/meter/ade7753.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions

[PATCH v2] staging: adis16060_core: Use private driver lock instead of mlock

2017-03-13 Thread simran singhal
ces global data. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- v2: -Fixed compilation error drivers/staging/iio/gyro/adis16060_core.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/iio/gyro/adis16060_core.c b/drivers/staging

[PATCH] staging: android: ion: Replace pr_err with dev_err

2017-03-13 Thread simran singhal
devm_"; identifier g =~ "^pcim_"; identifier h =~ "^dmam_"; @@ e=\(f\|g\|h\)(e1,...); <+... ( - pr_info( + dev_info(e1, ...); | - pr_err( + dev_err(e1, ...); | - pr_debug( + dev_dbg(e1, ...); ) ...+> Signed-off-by: simran singhal <singhalsimr...@gmail.com> -

[PATCH] staging: rtl8192u: ieee80211: Remove code in comments

2017-03-13 Thread simran singhal
Commenting out code is a bad idea. As comments are for explaining what code is about. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8192u/iee

Re: [PATCH] staging: android: Replace strcpy with strlcpy

2017-03-13 Thread SIMRAN SINGHAL
On Mon, Mar 13, 2017 at 6:27 PM, Dan Carpenter <dan.carpen...@oracle.com> wrote: > On Mon, Mar 13, 2017 at 06:17:22PM +0530, SIMRAN SINGHAL wrote: >> On Mon, Mar 13, 2017 at 6:11 PM, Dan Carpenter <dan.carpen...@oracle.com> >> wrote: >> > On Sun, Mar 12, 2017

Re: [PATCH] staging: android: Replace strcpy with strlcpy

2017-03-13 Thread SIMRAN SINGHAL
On Mon, Mar 13, 2017 at 6:11 PM, Dan Carpenter <dan.carpen...@oracle.com> wrote: > On Sun, Mar 12, 2017 at 02:10:01AM +0530, simran singhal wrote: >> Replace strcpy with strlcpy as strcpy does not check for buffer >> overflow. >> This is found using Flawfinder. >>

Re: [PATCH] staging: iio: ade7753: replace mlock with driver private lock

2017-03-13 Thread SIMRAN SINGHAL
On Mon, Mar 13, 2017 at 5:30 PM, Lars-Peter Clausen <l...@metafoo.de> wrote: > On 03/12/2017 02:32 PM, simran singhal wrote: >> The IIO subsystem is redefining iio_dev->mlock to be used by >> the IIO core only for protecting device operating mode changes. >> ie. Cha

Re: [Outreachy kernel] [PATCH] staging: adis16060_core: Use private driver lock instead of mlock

2017-03-13 Thread SIMRAN SINGHAL
On Mon, Mar 13, 2017 at 12:01 AM, Alison Schofield <amsfiel...@gmail.com> wrote: > On Sun, Mar 12, 2017 at 06:40:52PM +0530, simran singhal wrote: >> The IIO subsystem is redefining iio_dev->mlock to be used by >> the IIO core only for protecting device operating mode

Re: [Outreachy kernel] [PATCH] staging: iio: ade7753: replace mlock with driver private lock

2017-03-12 Thread SIMRAN SINGHAL
On Mon, Mar 13, 2017 at 12:03 AM, Alison Schofield <amsfiel...@gmail.com> wrote: > On Sun, Mar 12, 2017 at 07:02:50PM +0530, simran singhal wrote: >> The IIO subsystem is redefining iio_dev->mlock to be used by >> the IIO core only for protecting device operating mode

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

2017-03-12 Thread simran singhal
(...) { -return; } Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- v2: -cc the patch to more developers drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 1 - drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat.h | 1 - drivers/staging/media/atomi

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

2017-03-12 Thread simran singhal
) +pci224_gat_config(chan, src) Also, the comment describing the macro has been removed. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- v3: -Change the commit message. drivers/staging/comedi/drivers/amplc_pci224.c | 12 1 file changed, 8 insertions(+), 4 deletions(-)

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

2017-03-12 Thread SIMRAN SINGHAL
On Sun, Mar 12, 2017 at 7:24 PM, Greg KH <gre...@linuxfoundation.org> wrote: > On Fri, Mar 10, 2017 at 07:05:05PM +0530, simran singhal wrote: >> The function atomisp_set_stop_timeout on being called, simply returns >> back. The function hasn't been mentioned in the TODO and

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

2017-03-12 Thread simran singhal
macro has been removed manually. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- v2: -Change the name of static inline function -put some code from 2 line to 1 line drivers/staging/comedi/drivers/amplc_pci224.c | 12 1 file changed, 8 insertions(+), 4 dele

Re: [PATCH v3] staging: android: Replace strcpy with strlcpy

2017-03-12 Thread SIMRAN SINGHAL
On Sun, Mar 12, 2017 at 7:04 PM, Greg KH <gre...@linuxfoundation.org> wrote: > On Sun, Mar 12, 2017 at 03:32:44AM +0530, simran singhal wrote: >> Replace strcpy with strlcpy as strcpy does not check for buffer >> overflow. > > Can there be a buffer overflow here? If no

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

2017-03-12 Thread SIMRAN SINGHAL
On Sun, Mar 12, 2017 at 7:12 PM, Greg KH <gre...@linuxfoundation.org> wrote: > On Sat, Mar 11, 2017 at 05:10:34PM +0530, SIMRAN SINGHAL wrote: >> On Sat, Mar 11, 2017 at 5:01 PM, Dan Carpenter <dan.carpen...@oracle.com> >> wrote: >> > On Sat, Mar 11, 2017 at 08

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

2017-03-12 Thread SIMRAN SINGHAL
On Sun, Mar 12, 2017 at 7:26 PM, Greg KH <gre...@linuxfoundation.org> wrote: > On Fri, Mar 10, 2017 at 06:12:31PM +0530, simran singhal wrote: >> Convert macro GAT_CONFIG to static inline function as static inline >> functions are preferred over macros. This cha

[PATCH] staging: iio: ade7753: replace mlock with driver private lock

2017-03-12 Thread simran singhal
ces global data. Fix some coding style issues related to white space also. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/meter/ade7753.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/staging/iio/meter/ade7753.c

[PATCH] staging: adis16060_core: Use private driver lock instead of mlock

2017-03-12 Thread simran singhal
ces global data. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/gyro/adis16060_core.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/iio/gyro/adis16060_core.c b/drivers/staging/iio/gyro/adis16060_core.c inde

[PATCH v3] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread simran singhal
Replace strcpy with strlcpy as strcpy does not check for buffer overflow. This is found using Flawfinder. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- v3: -Correcting the place of the parenthesis and sign drivers/staging/android/ashmem.c | 3 ++- 1 file chan

Re: [Outreachy kernel] [PATCH v2] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread SIMRAN SINGHAL
On Sun, Mar 12, 2017 at 2:53 AM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sun, 12 Mar 2017, simran singhal wrote: > >> Replace strcpy with strlcpy as strcpy does not check for buffer >> overflow. >> This is found using Flawfinder. >> >

[PATCH v2] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread simran singhal
Replace strcpy with strlcpy as strcpy does not check for buffer overflow. This is found using Flawfinder. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- v2: -Correcting the place of the parenthesis drivers/staging/android/ashmem.c | 3 ++- 1 file changed, 2 insertions

[PATCH] staging: android: Replace strcpy with strlcpy

2017-03-11 Thread simran singhal
Replace strcpy with strlcpy as strcpy does not check for buffer overflow. This is found using Flawfinder. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/android/ashmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/a

[PATCH v2] staging: rtl8192u: Remove typedef phy_ofdm_rx_status_rxsc_sgien_exintfflag

2017-03-11 Thread simran singhal
Remove typdef phy_ofdm_rx_status_rxsc_sgien_exintfflag and replace its uses in the code. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- v2: -Drop the "_" at the beginning of the name of the structure drivers/staging/rtl8192u/r8192U.h | 4 ++-- drivers/

Re: [Outreachy kernel] [PATCH] staging: rtl8192u: Remove typedef phy_ofdm_rx_status_rxsc_sgien_exintfflag

2017-03-11 Thread SIMRAN SINGHAL
On Sat, Mar 11, 2017 at 9:56 PM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sat, 11 Mar 2017, simran singhal wrote: > >> Remove typdef phy_ofdm_rx_status_rxsc_sgien_exintfflag and replace its uses >> in the code. >> >> Signed-off-by

[PATCH] staging: rtl8192u: Remove typedef phy_ofdm_rx_status_rxsc_sgien_exintfflag

2017-03-11 Thread simran singhal
Remove typdef phy_ofdm_rx_status_rxsc_sgien_exintfflag and replace its uses in the code. Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/rtl8192u/r8192U.h | 4 ++-- drivers/staging/rtl8192u/r8192U_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 del

[PATCH v1 08/10] staging: iio: adis16203: Remove exceptional & on function name

2017-03-11 Thread simran singhal
Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - + f // Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging

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

2017-03-11 Thread simran singhal
Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - + f // Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging

[PATCH v1 09/10] staging: iio: resolver: Remove exceptional & on function name

2017-03-11 Thread simran singhal
Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - + f // Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/ii

[PATCH v1 10/10] staging: iio: gyro: Remove exceptional & on function name

2017-03-11 Thread simran singhal
Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - + f // Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/stagin

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

2017-03-11 Thread simran singhal
Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - + f // Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/cd

[PATCH v1 06/10] staging: iio: adis16201: Remove exceptional & on function name

2017-03-11 Thread simran singhal
Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - + f // Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging

[PATCH v1 05/10] staging: iio: adis16240: Remove exceptional & on function name

2017-03-11 Thread simran singhal
Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - + f // Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging

[PATCH v1 04/10] staging: iio: cdc: ad7152: Remove exceptional & on function name

2017-03-11 Thread simran singhal
Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - + f // Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/cd

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

2017-03-11 Thread simran singhal
Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - + f // Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/ad

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

2017-03-11 Thread simran singhal
Remove & from function pointers to conform to the style found elsewhere in the file. Done using the following semantic patch // @r@ identifier f; @@ f(...) { ... } @@ identifier r.f; @@ - + f // Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/ad

[PATCH v1 00/10] staging: iio: Remove exceptional & on functions name

2017-03-11 Thread simran singhal
This patch-series removes exceptional & on functions name. v1: -Change the commit message of all the patches of the patch-series simran singhal (10): staging: iio: ad7192: Remove exceptional & on function name staging: iio: ad7780: Remove exceptional & on function name stagi

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

2017-03-11 Thread SIMRAN SINGHAL
On Sat, Mar 11, 2017 at 5:01 PM, Dan Carpenter <dan.carpen...@oracle.com> wrote: > On Sat, Mar 11, 2017 at 08:07:01AM +0530, SIMRAN SINGHAL wrote: >> On Sat, Mar 11, 2017 at 2:43 AM, Dan Carpenter <dan.carpen...@oracle.com> >> wrote: >> > Don't resend, but

Re: [Outreachy kernel] [PATCH 00/10] staging: iio: Remove exceptional & on functions name

2017-03-11 Thread SIMRAN SINGHAL
On Sat, Mar 11, 2017 at 2:57 PM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sat, 11 Mar 2017, SIMRAN SINGHAL wrote: > >> On Sat, Mar 11, 2017 at 12:12 PM, Julia Lawall <julia.law...@lip6.fr> wrote: >> > >> > >> > On Sat, 11 Mar

Re: [Outreachy kernel] [PATCH 00/10] staging: iio: Remove exceptional & on functions name

2017-03-11 Thread SIMRAN SINGHAL
On Sat, Mar 11, 2017 at 12:12 PM, Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Sat, 11 Mar 2017, simran singhal wrote: > >> This patch-series removes exceptional & on functions name. > > The semantic patch shown does nothing to check that the use of

[PATCH 10/10] staging: iio: gyro: 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 // Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/gyro/adis16060_core.c | 2 +- 1 fi

[PATCH 08/10] staging: iio: adis16203: 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 // Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/accel/adis16203.c | 4 ++-- 1 file

[PATCH 09/10] staging: iio: resolver: 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 // Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/resolver/ad2s1200.c | 2 +- drive

[PATCH 04/10] staging: iio: cdc: ad7152: 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 // Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/cdc/ad7152.c | 6 +++--- 1 file

[PATCH 05/10] staging: iio: adis16240: 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 // Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/accel/adis16240.c | 4 ++-- 1 file

[PATCH 06/10] staging: iio: adis16201: 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 // Signed-off-by: simran singhal <singhalsimr...@gmail.com> --- drivers/staging/iio/accel/adis16201.c | 4 ++-- 1 file

[PATCH 00/10] staging: iio: Remove exceptional & on functions name

2017-03-10 Thread simran singhal
This patch-series removes exceptional & on functions name. simran singhal (10): staging: iio: ad7192: Remove exceptional & on function name staging: iio: ad7780: Remove exceptional & on function name staging: iio: cdc: ad7746: Remove exceptional & on function name s

  1   2   3   4   >