[PATCH] staging: iio: trigger: replace device_attr with device_attr_rw

2018-01-04 Thread Aishwarya Pant
This is a clean-up patch which replaces DEVICE_ATTR() macro with the file permission specific DEVICE_ATTR_RW() macro for compaction and readability. Done using coccinelle. Signed-off-by: Aishwarya Pant --- drivers/staging/iio/trigger/iio-trig-bfin-timer.c | 15 +++ 1 file changed, 7

Re: [PATCH] staging: fbtft: replace __ATTR() with DEVICE_ATTR()

2017-12-13 Thread Aishwarya Pant
On Wed, Dec 13, 2017 at 12:50:00PM +0100, Greg Kroah-Hartman wrote: > On Mon, Dec 11, 2017 at 03:24:30PM +0530, Aishwarya Pant wrote: > > This is a clean-up patch which replaces the uses of raw __ATTR(...) > > macro with the more conventional DEVICE_ATTR(...) for defining device

[PATCH] staging: atomisp2: replace DEVICE_ATTR with DEVICE_ATTR_RO

2017-12-11 Thread Aishwarya Pant
ICE_ATTR_RO(attr); @rr@ identifier r.show_fn, p.attr_show; @@ // rename the show function - show_fn + attr_show (...) { ... } @depends on rr@ identifier r.show_fn, p.attr_show; @@ // rename fn usages - show_fun + attr_show Signed-off-by: Aishwarya Pant --- drivers/staging/m

[PATCH] staging: fbtft: replace __ATTR() with DEVICE_ATTR()

2017-12-11 Thread Aishwarya Pant
lace usages everywhere - foo + id Signed-off-by: Aishwarya Pant --- drivers/staging/fbtft/fbtft-sysfs.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-sysfs.c b/drivers/staging/fbtft/fbtft-sysfs.c index 712096659aa0..506d604d01bb 100644

[PATCH v3 2/2] staging: atomisp: cleanup out of memory messages

2017-10-17 Thread Aishwarya Pant
handled with the following condition: { ... - f(..., c, ...); ... } Signed-off-by: Aishwarya Pant --- Changes in v3: Rebase changes over atomisp-next branch of the media tree drivers/staging/media/atomisp/i2c/atomisp-ap1302.c | 4 +--- drivers/staging/media/atomisp/i2c/atomisp

[PATCH v3 1/2] staging: atomisp2: cleanup null check on memory allocation

2017-10-17 Thread Aishwarya Pant
\|devm_ioremap\|usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\| kmalloc\|kmalloc_array\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|devm_kzalloc\)(...) ...when != p if ( - p == NULL + !p ) s else s1 Signed-off-by: Aishwarya Pant

[PATCH v3 0/2] staging: atomisp: memory allocation cleanups

2017-10-17 Thread Aishwarya Pant
Patch series performs minor code cleanups using coccinelle to simplify memory allocation tests and remove redundant OOM log messages. Changes in v3: Rebase changes over atomisp-next branch of the media tree Changes in v2: Rebase and re-send patches Aishwarya Pant (2): staging: atomisp2

[PATCH v2 2/2] staging: atomisp: cleanup out of memory messages

2017-10-14 Thread Aishwarya Pant
handled with the following condition: { ... - f(..., c, ...); ... } Signed-off-by: Aishwarya Pant --- v2 changes: None, just rebase and re-send drivers/staging/media/atomisp/i2c/ap1302.c | 4 +--- drivers/staging/media/atomisp/i2c/gc0310.c | 4

[PATCH v2 1/2] staging: atomisp2: cleanup null check on memory allocation

2017-10-14 Thread Aishwarya Pant
\|devm_ioremap\|usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\| kmalloc\|kmalloc_array\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|devm_kzalloc\)(...) ...when != p if ( - p == NULL + !p ) s else s1 Signed-off-by: Aishwarya Pant

[PATCH v2 0/2] staging: atomisp: memory allocation cleanups

2017-10-14 Thread Aishwarya Pant
Patch series performs minor code cleanups using coccinelle to simplify memory allocation tests and remove redundant OOM log messages. Changes in v2: Rebase and re-send patches Aishwarya Pant (2): staging: atomisp2: cleanup null check on memory allocation staging: atomisp: cleanup out of

[PATCH v2] staging: rtl8723bs: remove implicit int->bool conversions

2017-10-09 Thread Aishwarya Pant
: Aishwarya Pant Acked-by: Julia Lawall --- Changes in v2: -Wrap commit message in 72 characters drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core

[PATCH] staging: rtl8723bs: remove implicit int->bool conversions

2017-10-09 Thread Aishwarya Pant
: Aishwarya Pant --- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c index 355ce9b19d1c..0dca5cdef2e7 100644 --- a/drivers/staging

[PATCH 2/2] staging: atomisp: cleanup out of memory messages

2017-10-08 Thread Aishwarya Pant
handled with the following condition: { ... - f(..., c, ...); ... } Signed-off-by: Aishwarya Pant --- drivers/staging/media/atomisp/i2c/ap1302.c | 4 +--- drivers/staging/media/atomisp/i2c/gc0310.c | 4 +--- drivers/staging/media/atomisp/i2c/gc2235.c

[PATCH 0/2] staginng: atomisp: memory allocation cleanups

2017-10-08 Thread Aishwarya Pant
Patch series performs minor code cleanups using coccinelle to simplify memory allocation tests and remove redundant OOM log messages. Aishwarya Pant (2): staging: atomisp2: cleanup null check on memory allocation staging: atomisp: cleanup out of memory messages drivers/staging/media/atomisp

[PATCH 1/2] staging: atomisp2: cleanup null check on memory allocation

2017-10-08 Thread Aishwarya Pant
\|devm_ioremap\|usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\| kmalloc\|kmalloc_array\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|devm_kzalloc\)(...) ...when != p if ( - p == NULL + !p ) s else s1 Signed-off-by: Aishwarya Pant

[RESEND PATCH 2/3] staging: rtl8188eu: remove implicit bool->int conversions

2017-09-28 Thread Aishwarya Pant
: Aishwarya Pant --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index 2db2ca6..99f3d5c 100644 --- a/drivers/staging/rtl8188eu/core

[RESEND PATCH 3/3] staging: rtl8188eu: wrap lines in 80 characters

2017-09-28 Thread Aishwarya Pant
Perform cleanup for all function declarations in core/rtw_mlme_ext wherever checkpatch complains about lines being over 80 characters long. Signed-off-by: Aishwarya Pant --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 51 ++- 1 file changed, 34 insertions(+), 17

[RESEND PATCH 1/3] staging: rtl8188eu: remove unneeded conversions to bool

2017-09-28 Thread Aishwarya Pant
Patch suppresses the following warning issued by coccicheck: WARNING: conversion to bool not needed here Signed-off-by: Aishwarya Pant Acked-by: Julia Lawall --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers

[RESEND PATCH 0/3] staging: rtl8188eu: perform minor code cleanup

2017-09-28 Thread Aishwarya Pant
Patch series performs minor coccicheck and checkpatch cleanups. Aishwarya Pant (3): staging: rtl8188eu: remove unneeded conversions to bool staging: rtl8188eu: remove implicit bool->int conversions staging: rtl8188eu: wrap lines in 80 characters drivers/staging/rtl8188eu/c

Re: [Outreachy kernel] [PATCH] staging: rtl8188eu: remove unneeded conversions to bool

2017-09-22 Thread Aishwarya Pant
On Fri, Sep 22, 2017 at 11:47:44AM +0200, Julia Lawall wrote: > > > On Fri, 22 Sep 2017, Aishwarya Pant wrote: > > > Patch suppresses the following warning issued by coccicheck: > > WARNING: conversion to bool not needed here > > > > Signed-off-by: Aishwar

Re: [Outreachy kernel] [PATCH] staging: rtl8188eu: remove implicit bool->int conversions

2017-09-22 Thread Aishwarya Pant
On Fri, Sep 22, 2017 at 11:52:36AM +0200, Julia Lawall wrote: > > > On Fri, 22 Sep 2017, Aishwarya Pant wrote: > > > Implicit type conversions are bad; they hinder readability of code and have > > potential to cause bugs. Here the variable wait_ack is always supplied a

[PATCH] staging: rtl8188eu: remove unneeded conversions to bool

2017-09-22 Thread Aishwarya Pant
Patch suppresses the following warning issued by coccicheck: WARNING: conversion to bool not needed here Signed-off-by: Aishwarya Pant --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/core

[PATCH] staging: rtl8188eu: remove implicit bool->int conversions

2017-09-22 Thread Aishwarya Pant
: Aishwarya Pant --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index 2db2ca6..99f3d5c 100644 --- a/drivers/staging/rtl8188eu/core

[PATCH] [media] atomisp2: remove cast from memory allocation

2017-09-21 Thread Aishwarya Pant
Patch removes the following warning issued was coccicheck: WARNING: casting value returned by memory allocation function to (char *) is useless. Signed-off-by: Aishwarya Pant --- drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH] staging: rtl8188eu: remove parenthesis from right hand side of assignment

2017-09-15 Thread Aishwarya Pant
Parenthesis are not needed around the right hand side of an assignment. This patch was made on the core files of rtl8188eu using the following coccinelle script. @@ binary operator op = {==,!=,&&,||,>=,<=,&,|}; expression l, r, t; @@ ( l = (r op t) | l = -( r -) ) Signed-off-

[PATCH 3/3] staging: rtl8188eu: fix sparse signedness warnings in rtw_generate_ie

2017-04-15 Thread Aishwarya Pant
/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60:expected int *wpa_ie_len drivers/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60:got unsigned int * Signed-off-by: Aishwarya Pant --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 2 +- drivers/staging/rtl8188eu/include/ieee80211.h | 2

[PATCH 2/3] staging: rtl8188eu: fix sparse signedness warnings in rtw_set_ie

2017-04-15 Thread Aishwarya Pant
unsigned int [usertype] *frlen drivers/staging/rtl8188eu//core/rtw_ieee80211.c:258:97:got int * Signed-off-by: Aishwarya Pant --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b

[PATCH 1/3] staging: rtl8188eu: fix sparse signedness warnings in rtw_get_ie

2017-04-15 Thread Aishwarya Pant
/staging/rtl8188eu//core/rtw_ap.c:78:60:expected int *len drivers/staging/rtl8188eu//core/rtw_ap.c:78:60:got unsigned int * Signed-off-by: Aishwarya Pant --- drivers/staging/rtl8188eu/core/rtw_ap.c| 2 +- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 10 +- drivers

[PATCH 0/3] staging: rtl8188eu: fix sparse signedness mismatch warnings

2017-04-15 Thread Aishwarya Pant
Suppress all sparse signedness mismatch warnings generated by- make C=2 M=drivers/staging/rtl8188eu/ CF="-Wtypesign" Aishwarya Pant (3): staging: rtl8188eu: fix sparse signedness warnings in rtw_get_ie staging: rtl8188eu: fix sparse signedness warnings in rtw_set_ie staging: rtl8

[PATCH] staging: rtl8723bs: remove null test before kfree

2017-04-10 Thread Aishwarya Pant
kfree(..) on a NULL pointer is a no-op; the null test here is redundant. Detected by coccicheck. Signed-off-by: Aishwarya Pant --- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 6 ++ drivers/staging/rtl8723bs/hal/sdio_ops.c | 6 ++ drivers/staging/rtl8723bs/os_dep

[PATCH v2] staging: bcm2835-audio: remove unnecessary log messages

2017-04-03 Thread Aishwarya Pant
Remove unnecessary log messages in the driver which are just tracking function entry and exits. Signed-off-by: Aishwarya Pant --- Changes in v2: Patch v1 introduced a compile error; remove it by deleting the log continuation. .../vc04_services/bcm2835-audio/bcm2835-ctl.c | 2

[PATCH] staging: bcm2835-audio: remove unnecessary log messages

2017-03-31 Thread Aishwarya Pant
Remove unnecessary log messages in the driver which were just tracking function entry and exits. Signed-off-by: Aishwarya Pant --- There are many functions here like: bcm2835_audio_setup(..) bcm2835_audio_flush_playback_buffers(..) bcm2835_audio_flush_buffers(..) which are not doing any work