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: >> > Replace printk having a log level with the ap

[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 --- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 34 ++- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c

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

[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 --- drivers/staging/rtl8723bs/hal/odm_DIG.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[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 --- drivers/staging/sm750fb/ddk750_chip.c | 4

[PATCH] iio: pressure: zpa2326: Remove unnecessary cast on void pointer

2017-04-01 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/iio/pressure/zpa2326.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deleti

[PATCH] iio: imu: st_lsm6dsx: Remove unnecessary cast on void pointer

2017-04-01 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/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 4 ++-- 1 file changed, 2 inserti

[PATCH] iio: humidity: hts221_buffer: Remove unnecessary cast on void pointer

2017-04-01 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/iio/humidity/hts221_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH] iio: dac: ad5504: Remove unnecessary cast on void pointer

2017-04-01 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/iio/dac/ad5504.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH] iio: common: ms_sensors: Remove unnecessary cast on void pointer

2017-04-01 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/iio/common/ms_sensors/ms_sensors_i2c.c | 4 ++-- 1 file changed, 2 inserti

[PATCH] iio: adc: Remove unnecessary cast on void pointer

2017-04-01 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/iio/adc/exynos_adc.c | 2 +- drivers/iio/adc/imx7d_adc.c

[PATCH] net: ipv4: netfilter: Remove unused function nf_nat_need_gre()

2017-04-01 Thread simran singhal
The function nf_nat_need_gre() on being called, simply returns back. The function doesn't have FIXME code around. Hence, nf_nat_need_gre() and its calls have been removed. Signed-off-by: simran singhal --- net/ipv4/netfilter/nf_nat_pptp.c | 2 -- net/ipv4/netfilter/nf_nat_proto_gre.

[PATCH] iio: proximity: as3935: constify attribute_group structures

2017-04-01 Thread simran singhal
name 4101 256 043571105 drivers/iio/proximity/as3935.o Signed-off-by: simran singhal --- drivers/iio/proximity/as3935.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/proximity/as3935.c b/drivers/iio/proximity/as3935.c index 5656deb..1b8b472 10

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

2017-04-01 Thread simran singhal
name 2340 320 02660 a64 drivers/iio/light/bh1750.o Signed-off-by: simran singhal --- drivers/iio/light/bh1750.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/light/bh1750.c b/drivers/iio/light/bh1750.c index b059466..6c61187 100644 --- a/drivers

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

2017-04-01 Thread simran singhal
name 8567 424 08991231f drivers/iio/light/apds9960.o Signed-off-by: simran singhal --- drivers/iio/light/apds9960.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c index 90bc98d..c7af36d 100644 -

[PATCH] iio: humidity: hdc100x: constify attribute_group structures

2017-04-01 Thread simran singhal
name 3507 424 03931 f5b drivers/iio/humidity/hdc100x.o Signed-off-by: simran singhal --- drivers/iio/humidity/hdc100x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c index 265c34d..aa17115 10

[PATCH] iio: adc: hx711: constify attribute_group structures

2017-04-01 Thread simran singhal
3098 416 03514 dba drivers/iio/adc/hx711.o Signed-off-by: simran singhal --- drivers/iio/adc/hx711.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/hx711.c b/drivers/iio/adc/hx711.c index 139639f..27005d8 100644 --- a/drivers/iio/adc/hx711.c +

[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 --- drivers/staging/iio/light/tsl2x7x_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/light

Re: [PATCH 1/3] iio: health: afe440x: Remove code in comments

2017-03-31 Thread SIMRAN SINGHAL
Please ignore this Patch. This Patch is wrong. On Sat, Apr 1, 2017 at 12:20 AM, Joe Perches wrote: > On Sat, 2017-04-01 at 00:13 +0530, SIMRAN SINGHAL wrote: >> On Sat, Apr 1, 2017 at 12:03 AM, Joe Perches wrote: >> > On Fri, 2017-03-31 at 22:16 +0530, simran singhal wrote:

Re: [PATCH 0/3] iio: health: Clean up

2017-03-31 Thread SIMRAN SINGHAL
Please ignore this Patch. As this patch is completely wrong due to my lack of understanding. On Fri, Mar 31, 2017 at 10:16 PM, simran singhal wrote: > This patch-series removes commented code in afe440x.h and > removes unused functions in afe4404.c and afe4403.c. > > simran singhal

Re: [PATCH 1/3] iio: health: afe440x: Remove code in comments

2017-03-31 Thread SIMRAN SINGHAL
On Sat, Apr 1, 2017 at 12:03 AM, Joe Perches wrote: > On Fri, 2017-03-31 at 22:16 +0530, simran singhal wrote: >> Commenting out code is a bad idea. >> As comments are for explaining what code is about. > > patch doesn't match commit message. In commit message I am cle

[PATCH 1/3] iio: health: afe440x: Remove code in comments

2017-03-31 Thread simran singhal
Commenting out code is a bad idea. As comments are for explaining what code is about. Signed-off-by: simran singhal --- drivers/iio/health/afe440x.h | 58 1 file changed, 58 deletions(-) diff --git a/drivers/iio/health/afe440x.h b/drivers/iio/health

[PATCH 2/3] iio: health: afe4404: Remove all unused functions

2017-03-31 Thread simran singhal
The functions afe440x_show_register and afe440x_store_register are never used anywhere in the kernel. So, remove their definitions. Grepped to find occurences. Signed-off-by: simran singhal --- drivers/iio/health/afe4404.c | 51 1 file changed, 51

[PATCH 3/3] iio: health: afe4403: Remove all unused functions

2017-03-31 Thread simran singhal
The functions afe440x_show_register and afe440x_store_register are never used anywhere in the kernel. So, remove their definitions. Grepped to find occurences. Signed-off-by: simran singhal --- drivers/iio/health/afe4403.c | 51 1 file changed, 51

[PATCH 0/3] iio: health: Clean up

2017-03-31 Thread simran singhal
This patch-series removes commented code in afe440x.h and removes unused functions in afe4404.c and afe4403.c. simran singhal (3): iio: health: afe440x: Remove code in comments iio: health: afe4404: Remove all unused functions iio: health: afe4403: Remove all unused functions drivers/iio

[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 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 *)(&a) + &a ) Signed-of

[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 *)(&a) + &a ) Signed-of

[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 *)(&a) + &a ) Signed-of

[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 --- v2: -Change the subject. -Add signed-off-by. drivers/staging/iio/gyro/adis16060_cor

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 wrote: > > > On 30 March 2017 19:44:26 BST, SIMRAN SINGHAL > wrote: >>On Fri, Mar 31, 2017 at 12:02 AM, Jonathan Cameron >>wrote: >>> On 28/03/17 19:37, Alison Schofield wrote: >>>> On Tue, Mar 28, 2

[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 a/drivers/staging/iio/gyro/adis1606

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 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 >>> wrote: >>>> On Fri, M

[PATCH v2] iio: light: lm3533-als: constify attribute_group structures

2017-03-30 Thread simran singhal
bss dec hex filename 57982376 081741fee drivers/iio/light/lm3533-als.o File size after: textdata bss dec hex filename 59262248 081741fee drivers/iio/light/lm3533-als.o Signed-off-by: simran singhal --- v2: -make one

Re: [PATCH] iio: adc: ad799x: constify attribute_group structures

2017-03-29 Thread SIMRAN SINGHAL
On Thu, Mar 30, 2017 at 3:06 AM, Jonathan Cameron wrote: > On 29/03/17 22:28, SIMRAN SINGHAL wrote: >> On Thu, Mar 30, 2017 at 2:43 AM, Jonathan Cameron wrote: >>> On 28/03/17 21:07, simran singhal wrote: >>>> Check for attribute_group structures that are only

Re: [PATCH] iio: adc: ad799x: constify attribute_group structures

2017-03-29 Thread SIMRAN SINGHAL
On Thu, Mar 30, 2017 at 2:43 AM, Jonathan Cameron wrote: > On 28/03/17 21:07, simran singhal wrote: >> Check for attribute_group structures that are only stored in the >> event_attrs filed of iio_info structure. As the event_attrs field of >> iio_info structures

Re: [PATCH] iio: adc: max1363: constify attribute_group structures

2017-03-29 Thread SIMRAN SINGHAL
On Thu, Mar 30, 2017 at 2:41 AM, Jonathan Cameron wrote: > On 28/03/17 21:15, simran singhal wrote: >> Check for attribute_group structures that are only stored in the >> event_attrs filed of iio_info structure. As the event_attrs field of >> iio_info structures

Re: [PATCH] iio: dac: ad5504: constify attribute_group structures

2017-03-29 Thread SIMRAN SINGHAL
On Thu, Mar 30, 2017 at 2:39 AM, Jonathan Cameron wrote: > On 28/03/17 21:21, simran singhal wrote: >> Check for attribute_group structures that are only stored in the >> event_attrs filed of iio_info structure. As the event_attrs field of >> iio_info structures

Re: [Outreachy kernel] [PATCH 1/4] iio: common: st_sensors: Replace ternary operator with min macro

2017-03-29 Thread SIMRAN SINGHAL
On Wed, Mar 29, 2017 at 9:46 PM, Daniel Baluta wrote: > On Wed, Mar 29, 2017 at 3:33 PM, simran singhal > wrote: >> Use macro min() to get the minimum of two values for brevity and >> readability. >> >> Signed-off-by: simran singhal >> --- >> drivers/

Re: [Outreachy kernel] [PATCH 4/4] iio: light: si1145: Replace ternary operator with min macro

2017-03-29 Thread SIMRAN SINGHAL
On Wed, Mar 29, 2017 at 8:22 PM, SIMRAN SINGHAL wrote: > On Wed, Mar 29, 2017 at 6:23 PM, Lars-Peter Clausen wrote: >> On 03/29/2017 02:40 PM, Julia Lawall wrote: >>> >>> >>> On Wed, 29 Mar 2017, simran singhal wrote: >>> >>>> Use mac

Re: [Outreachy kernel] [PATCH 4/4] iio: light: si1145: Replace ternary operator with min macro

2017-03-29 Thread SIMRAN SINGHAL
On Wed, Mar 29, 2017 at 6:23 PM, Lars-Peter Clausen wrote: > On 03/29/2017 02:40 PM, Julia Lawall wrote: >> >> >> On Wed, 29 Mar 2017, simran singhal wrote: >> >>> Use macro min() to get the minimum of two values for brevity and >>> reada

[PATCH] iio: accel: bma180: Set up buffer timestamps for non-zero values

2017-03-29 Thread simran singhal
Use the iio_pollfunc_store_time parameter during triggered buffer set-up to get valid timestamps. Signed-off-by: simran singhal --- drivers/iio/accel/bma180.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c index

[PATCH 3/4] iio: imu: st_lsm6dsx: Replace ternary operator with min macro

2017-03-29 Thread simran singhal
Use macro min() to get the minimum of two values for brevity and readability. Signed-off-by: simran singhal --- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c b/drivers/iio/imu

[PATCH 4/4] iio: light: si1145: Replace ternary operator with min macro

2017-03-29 Thread simran singhal
Use macro min() to get the minimum of two values for brevity and readability. Signed-off-by: simran singhal --- drivers/iio/light/si1145.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/light/si1145.c b/drivers/iio/light/si1145.c index 096034c..e7ad6fb 100644

[PATCH 2/4] iio: imu: st_lsm6dsx: Replace ternary operator with min macro

2017-03-29 Thread simran singhal
Use macro min() to get the minimum of two values for brevity and readability. Signed-off-by: simran singhal --- drivers/iio/humidity/hts221_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/humidity/hts221_core.c b/drivers/iio/humidity/hts221_core.c index

[PATCH 0/4] drivers: iio: Replace ternary operator with min macro

2017-03-29 Thread simran singhal
Use macro min() to get the minimum of two values for brevity and readability. simran singhal (4): iio: common: st_sensors: Replace ternary operator with min macro iio: imu: st_lsm6dsx: Replace ternary operator with min macro iio: imu: st_lsm6dsx: Replace ternary operator with min macro

[PATCH 1/4] iio: common: st_sensors: Replace ternary operator with min macro

2017-03-29 Thread simran singhal
Use macro min() to get the minimum of two values for brevity and readability. Signed-off-by: simran singhal --- drivers/iio/common/st_sensors/st_sensors_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/common/st_sensors/st_sensors_i2c.c b/drivers/iio/common

Re: [PATCH v2] netfilter: Clean up tests if NULL returned on failure

2017-03-29 Thread SIMRAN SINGHAL
On Wed, Mar 29, 2017 at 2:19 PM, SIMRAN SINGHAL wrote: > On Wed, Mar 29, 2017 at 12:25 PM, Jan Engelhardt wrote: >> >> On Tuesday 2017-03-28 18:23, SIMRAN SINGHAL wrote: >>>On Tue, Mar 28, 2017 at 7:24 PM, Jan Engelhardt wrote: >>>> On Tuesday 20

Re: [PATCH v2] netfilter: Clean up tests if NULL returned on failure

2017-03-29 Thread SIMRAN SINGHAL
On Wed, Mar 29, 2017 at 12:25 PM, Jan Engelhardt wrote: > > On Tuesday 2017-03-28 18:23, SIMRAN SINGHAL wrote: >>On Tue, Mar 28, 2017 at 7:24 PM, Jan Engelhardt wrote: >>> On Tuesday 2017-03-28 15:13, simran singhal wrote: >>> >>>>Some functions like km

[PATCH] net: netfilter: Use list_{next/prev}_entry instead of list_entry

2017-03-28 Thread simran singhal
This patch replace list_entry with list_prev_entry as it makes the code more clear to read. Signed-off-by: simran singhal --- net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index

[PATCH] net: netfilter: Use seq_puts()/seq_putc() where possible

2017-03-28 Thread simran singhal
For string without format specifiers, use seq_puts(). For seq_printf("\n"), use seq_putc('\n'). Signed-off-by: simran singhal --- net/netfilter/ipvs/ip_vs_ctl.c | 8 net/netfilter/nf_conntrack_expect.c | 4 ++-- net/netfilter/nf_conntrack_standalo

[PATCH] iio: light: lm3533-als: constify attribute_group structures

2017-03-28 Thread simran singhal
dec hex filename 58622312 081741fee drivers/iio/light/lm3533-als.o Signed-off-by: simran singhal --- drivers/iio/light/lm3533-als.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/light/lm3533-als.c b/drivers/iio/light/lm3533-als.c i

[PATCH] iio: dac: ad5504: constify attribute_group structures

2017-03-28 Thread simran singhal
dec hex filename 3110 296 03406 d4e drivers/iio/dac/ad5504.o Signed-off-by: simran singhal --- drivers/iio/dac/ad5504.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/dac/ad5504.c b/drivers/iio/dac/ad5504.c index 788b3d6..22a027d 100644 -

[PATCH] iio: adc: max1363: constify attribute_group structures

2017-03-28 Thread simran singhal
dec hex filename 37015 384 0 373999217 drivers/iio/adc/max1363.o Signed-off-by: simran singhal --- drivers/iio/adc/max1363.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c index c6c12fe..80eada4 100644 -

[PATCH] iio: adc: ad799x: constify attribute_group structures

2017-03-28 Thread simran singhal
dec hex filename 26115 400 0 265156793 drivers/iio/adc/ad799x.o Signed-off-by: simran singhal --- drivers/iio/adc/ad799x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ad799x.c b/drivers/iio/adc/ad799x.c index 9704090..22426ae 100644 -

[PATCH v2] net: Remove unnecessary cast on void pointer

2017-03-28 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 ) Unnecessary parantheses are also remove. Signed-off-by: simran singhal --- v2: -Remove unnecessary parantheses

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 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 changes. >> ie. Changes b

Re: [PATCH v2] netfilter: Clean up tests if NULL returned on failure

2017-03-28 Thread SIMRAN SINGHAL
On Tue, Mar 28, 2017 at 7:24 PM, Jan Engelhardt wrote: > On Tuesday 2017-03-28 15:13, simran singhal wrote: > >>Some functions like kmalloc/kzalloc return NULL on failure. When NULL >>represents failure, !x is commonly used. >> >>@@ -910,7 +910,7 @@ ip_vs_new_

[PATCH] netfilter: ipset: Use max macro instead of ternary operator

2017-03-28 Thread simran singhal
This patch replaces ternary operator with macro max as it shorter and thus increases code readability. Macro max return the maximum of the two compared values. Signed-off-by: simran singhal --- net/netfilter/ipset/ip_set_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v2] netfilter: Clean up tests if NULL returned on failure

2017-03-28 Thread simran singhal
Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. Signed-off-by: simran singhal --- v2: -squash all the patches of the patch-set. net/netfilter/ipvs/ip_vs_ctl.c | 4 ++-- net/netfilter/ipvs/ip_vs_dh.c| 2

[PATCH] net: Remove unnecessary cast on void pointer

2017-03-28 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 --- net/bridge/netfilter/ebtables.c | 2 +- net/ipv4/netfilter/arp_table

[PATCH v3] netfilter: Compress return logic

2017-03-28 Thread simran singhal
Simplify function returns by merging assignment and return into one statement. Signed-off-by: simran singhal --- v3: -change commit message. -merge two patches into one. v2: -Change the subject of cover patch net/netfilter/ipset/ip_set_list_set.c | 5 + net/netfilter/ipvs

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 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. Changes between INDIO_DIRECT_MO

[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 --- 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/ade7753.c index b71fbd3..30aebaf 100644 --

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 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. Changes between INDIO_DIRECT_MO

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

2017-03-23 Thread simran singhal
is removed. Signed-off-by: simran singhal --- 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_unlock drivers/staging/iio/gyr

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

2017-03-22 Thread simran singhal
reads. Signed-off-by: simran singhal --- 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: -Rename

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

2017-03-22 Thread SIMRAN SINGHAL
On Wed, Mar 22, 2017 at 7:08 PM, Pablo Neira Ayuso wrote: > On Tue, Mar 21, 2017 at 02:14:34PM +0530, simran singhal wrote: >> This patch series clean up tests if NULL returned on failure. > > $ git grep "== NULL" net/netfilter/ | wc -l > 461 > > This is clean

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 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. > Subject and log message can be i

[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 --- drivers/staging/iio/meter/ade7753.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/iio/meter/ade7753.c b/drivers/staging/iio/meter

[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 --- 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..9674e05 100644 --- a/drivers/staging/iio/me

[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 deletions(-) -- 2.7.4

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 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. > Subject and log message can be im

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

2017-03-21 Thread SIMRAN SINGHAL
t; > 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 (attached as .config)

[PATCH v2 1/2] netfilter: ipset: Compress return logic

2017-03-21 Thread simran singhal
Simplify function returns by merging assignment and return into one command line. Signed-off-by: simran singhal --- --This is my contribution to the netfilter project of Outreachy Round 14. net/netfilter/ipset/ip_set_list_set.c | 5 + 1 file changed, 1 insertion(+), 4 deletions

[PATCH v2 2/2] netfilter: ipvs: Compress return logic

2017-03-21 Thread simran singhal
Simplify function returns by merging assignment and return into one command line. Signed-off-by: simran singhal --- --This is my contribution to the netfilter project of Outreachy Round 14. net/netfilter/ipvs/ip_vs_ftp.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff

[PATCH v2 0/2] netfilter: Compress return logic

2017-03-21 Thread simran singhal
This patch series Simplify function returns by merging assignment and return into one command line. v2: -Change the subject of cover patch simran singhal (2): netfilter: ipset: Compress return logic netfilter: ipvs: Compress return logic net/netfilter/ipset/ip_set_list_set.c | 5

[PATCH 0/2] netfilter: ,net...@vger.kernel.org

2017-03-21 Thread simran singhal
This patch series Simplify function returns by merging assignment and return into one command line. simran singhal (2): netfilter: ipset: Compress return logic netfilter: ipvs: Compress return logic net/netfilter/ipset/ip_set_list_set.c | 5 + net/netfilter/ipvs/ip_vs_ftp.c| 5

[PATCH 2/2] netfilter: ipvs: Compress return logic

2017-03-21 Thread simran singhal
Simplify function returns by merging assignment and return into one command line. Signed-off-by: simran singhal --- --This is my contribution to the netfilter project of Outreachy Round 14. net/netfilter/ipvs/ip_vs_ftp.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff

[PATCH 1/2] netfilter: ipset: Compress return logic

2017-03-21 Thread simran singhal
Simplify function returns by merging assignment and return into one command line. Signed-off-by: simran singhal --- --This is my contribution to the netfilter project of Outreachy Round 14. net/netfilter/ipset/ip_set_list_set.c | 5 + 1 file changed, 1 insertion(+), 4 deletions

[PATCH 0/2] netfilter: Remove unnecessary cast on void pointer

2017-03-21 Thread simran singhal
This patch series remove unnecessary cast on void pointer. simran singhal (2): netfilter: ipset: Remove unnecessary cast on void pointer netfilter: Remove unnecessary cast on void pointer net/netfilter/ipset/ip_set_bitmap_gen.h | 4 ++-- net/netfilter/ipset/ip_set_core.c | 2 +- net

[PATCH 1/2] netfilter: ipset: Remove unnecessary cast on void pointer

2017-03-21 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 --- --This is my contribution to the netfilter project of Outreachy Round 14.

[PATCH 2/2] netfilter: Remove unnecessary cast on void pointer

2017-03-21 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 --- --This is my contribution to the netfilter project of Outreachy Round 14.

[PATCH 5/5] netfilter: xt_TEE: Clean up tests if NULL returned on failure

2017-03-21 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] netfilter: Clean up tests if NULL returned on failure

2017-03-21 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/5] netfilter: ipvs: Clean up tests if NULL returned on failure

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

[PATCH 4/5] netfilter: nfnetlink: Clean up tests if NULL returned on failure

2017-03-21 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] netfilter: nf_tables_api: Clean up tests if NULL returned on failure

2017-03-21 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/5] netfilter: Clean up tests if NULL returned on failure

2017-03-21 Thread simran singhal
This patch series clean up tests if NULL returned on failure. simran singhal (5): netfilter: ipvs: Clean up tests if NULL returned on failure netfilter: Clean up tests if NULL returned on failure netfilter: nf_tables_api: Clean up tests if NULL returned on failure netfilter: nfnetlink

[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 --- drivers/staging/iio/meter/ade7754.c | 87 ++- drivers/staging/iio/meter/ade7754.h | 90

[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 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 --- 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/meter/ade7754.c index 42f7b06

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

2017-03-20 Thread simran singhal
the locks inside it being called. Signed-off-by: simran singhal --- 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 changed, 11 inserti

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 wrote: > On 19/03/17 17:14, Gargi Sharma wrote: >> On Sun, Mar 19, 2017 at 6:20 PM, simran singhal >> wrote: >>> The IIO subsystem is redefining iio_dev->mlock to be used by >>> the IIO core only for prot

[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 &st->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 --- v6: -Change commit message -Remove nested lock drivers/stagin

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 wrote: > > > On Sun, 19 Mar 2017, simran singhal wrote: > >> Remove unnecessary goto. >> >> Signed-off-by: simran singhal >> --- >> drivers/staging/iio/impedance-analyzer/ad5933.c | 10 -- >&g

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

2017-03-19 Thread simran singhal
Remove unnecessary goto. Signed-off-by: simran singhal --- 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/impedance-analyzer/ad5933.c index

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

2017-03-19 Thread simran singhal
ned-off-by: simran singhal --- 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/iio/gyro/adis16060_core.c |

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 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. Changes between INDIO_DIRECT_MO

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 wrote: > On 18/03/17 17:34, SIMRAN SINGHAL wrote: >> On Thu, Mar 16, 2017 at 3:23 AM, Jonathan Cameron wrote: >>> On 13/03/17 19:53, Alison Schofield wrote: >>>> On Mon, Mar 13, 2017 at 10:01:07PM +0530, simra

  1   2   3   4   >