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
On Fri, Mar 3, 2017 at 11:15 PM, Sakari Ailus wrote:
> Hi Simran,
>
> On Fri, Mar 03, 2017 at 01:21:56AM +0530, simran singhal wrote:
>> This patch removes unnecessary typecast of c90 int constant.
>>
>> WARNING: Unnecessary typecast of c90 int constant
>>
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/staging/lustre/lustre/lmv/lmv_obd.c | 4 ++--
1 file changed, 2 insertions(+)
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/staging/rts5208/rtsx_transport.c | 3 +--
1 file changed, 1 insertion(+)
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/staging/rtl8712/rtl8712_recv.c | 11 +--
1 file changed, 5 inserti
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/staging/lustre/lustre/llite/range_lock.c | 2 +-
drivers/staging/lustre/lustre/
This patch-series removes unnecessary cast on void pointer in various
drivers.
v4:
-change the cover-letter subject
v3:
-Fixed compilation warning in lustre/lustre/llite/range_lock.c
simran singhal (5):
staging: nvec: Remove unnecessary cast on void pointer
staging: lustre: Remove
The sematic patch used for this is:
@@
identifier i;
constant c;
@@
return
- (
\(i\|-i\|i(...)\|c\)
- )
;
Signed-off-by: simran singhal
---
.../media/atomisp/pci/atomisp2/css2400/sh_css.c | 20 ++--
.../atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 2 +-
2 files
On Fri, Mar 3, 2017 at 9:45 PM, Julia Lawall wrote:
>
>
> On Fri, 3 Mar 2017, SIMRAN SINGHAL wrote:
>
>> On Fri, Mar 3, 2017 at 9:20 PM, Joe Perches wrote:
>> > On Fri, 2017-03-03 at 17:05 +0530, simran singhal wrote:
>> >> Fixed compilation warn
On Fri, Mar 3, 2017 at 9:20 PM, Joe Perches wrote:
> On Fri, 2017-03-03 at 17:05 +0530, simran singhal wrote:
>> Fixed compilation warning in lustre/lustre/llite/range_lock.c
>
> Really? What compilation warning was removed?
CC [M] drivers/staging/lustre/lustre/mgc/mgc_re
This patch replace "the the " with "the". The replacement couldn't be
automated because sometimes the first "the" was meant to be another
word.
Signed-off-by: simran singhal
---
drivers/staging/wlan-ng/prism2sta.c | 2 +-
1 file changed, 1 insertion(+),
This patch replace "the the " with "the". The replacement couldn't be
automated because sometimes the first "the" was meant to be another
word.
Signed-off-by: simran singhal
---
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +-
1 file changed, 1 insert
This patch replace "the the " with "the". The replacement couldn't be
automated because sometimes the first "the" was meant to be another
word.
Signed-off-by: simran singhal
---
drivers/staging/unisys/visorbus/visorbus_main.c | 2 +-
1 file changed, 1 insert
This patch series replace "the the " with "the" in various drivers.
v3:
-Resend the complete patch series.
simran singhal (3):
staging: wlan-ng: Replace "the the " with "the"
staging: rtl8192u: Replace "the the " with "the"
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/staging/lustre/lustre/llite/range_lock.c | 2 +-
drivers/staging/lustre/lustre/
This patch series replace "the the " with "the" in various drivers.
v1:
-Adding cover-letter for the series.
simran singhal (3):
staging: wlan-ng: Replace "the the " with "the"
staging: rtl8192u: Replace "the the " with "the"
This patch replace "the the " with "the". The replacement couldn't be
automated because sometimes the first "the" was meant to be another
word.
Signed-off-by: simran singhal
---
drivers/staging/wlan-ng/prism2sta.c | 2 +-
1 file changed, 1 insertion(+),
This patch replace "the the " with "the". The replacement couldn't be
automated because sometimes the first "the" was meant to be another
word.
Signed-off-by: simran singhal
---
drivers/staging/unisys/visorbus/visorbus_main.c | 2 +-
1 file changed, 1 insert
This patch replace "the the " with "the". The replacement couldn't be
automated because sometimes the first "the" was meant to be another
word.
Signed-off-by: simran singhal
---
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +-
1 file changed, 1 insert
This patch replace "the the " with "the". The replacement couldn't be
automated because sometimes the first "the" was meant to be another
word.
Signed-off-by: simran singhal
---
drivers/staging/unisys/visorbus/visorbus_main.c | 2 +-
1 file changed, 1 insert
This patch replace "the the " with "the". The replacement couldn't be
automated because sometimes the first "the" was meant to be another
word.
Signed-off-by: simran singhal
---
drivers/staging/wlan-ng/prism2sta.c | 2 +-
1 file changed, 1 insertion(+),
This patch series replace "the the " with "the" in various drivers.
v2:
-Adding cover-letter for the series.
simran singhal (3):
staging: wlan-ng: Replace "the the " with "the"
staging: rtl8192u: Replace "the the " with "the"
This patch replace "the the " with "the". The replacement couldn't be
automated because sometimes the first "the" was meant to be another
word.
Signed-off-by: simran singhal
---
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +-
1 file changed, 1 insert
This patch replace "the the " with "the". The replacement couldn't be
automated because sometimes the first "the" was meant to be another
word.
Signed-off-by: simran singhal
---
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +-
1 file changed, 1 insert
This patch replace "the the " with "the". The replacement couldn't be
automated because sometimes the first "the" was meant to be another
word.
Signed-off-by: simran singhal
---
drivers/staging/wlan-ng/prism2sta.c | 2 +-
1 file changed, 1 insertion(+),
This patch replace "the the " with "the". The replacement couldn't be
automated because sometimes the first "the" was meant to be another
word.
Signed-off-by: simran singhal
---
drivers/staging/unisys/visorbus/visorbus_main.c | 2 +-
1 file changed, 1 insert
This patch replace "the the " with "the". The replacement couldn't be
automated because sometimes the first "the" was meant to be another
word.
Signed-off-by: simran singhal
---
drivers/staging/wlan-ng/prism2sta.c | 2 +-
1 file changed, 1 insertion(+),
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/staging/rts5208/rtsx_transport.c | 3 +--
1 file changed, 1 insertion(+)
Fixed compilation warning in lustre/lustre/llite/range_lock.c
simran singhal (5):
staging: nvec: Remove unnecessary cast on void pointer
staging: lustre: Remove unnecessary cast on void pointer
staging: lustre: lustre: Remove unnecessary cast on void pointer
staging: rts5208: Remove
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/staging/rtl8712/rtl8712_recv.c | 11 +--
1 file changed, 5 inserti
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/staging/lustre/lustre/lmv/lmv_obd.c | 4 ++--
1 file changed, 2 insertions(+)
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/staging/nvec/nvec_kbd.c | 2 +-
1 file changed, 1 insertion(+), 1 delet
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
---
v2:
-Moved buf to the previous line.
drivers/staging/rts5208/rtsx_transport.c
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
---
v2:
-Moved pcontext to the previous line
drivers/staging/rtl8712/rtl8712_recv.c |
This patch fixes the following sparse warning:
warning: cast to restricted __le16
Signed-off-by: simran singhal
---
drivers/staging/wlan-ng/prism2sta.c | 51 ++---
1 file changed, 25 insertions(+), 26 deletions(-)
diff --git a/drivers/staging/wlan-ng/prism2sta.c
Add blank line after a declaration. Problem found
using checkpatch.
This patch fixes these warning messages found by checkpatch.pl:
WARNING : Missing a blank line after declarations.
Signed-off-by: simran singhal
---
drivers/staging/media/atomisp/i2c/gc2235.c | 7 +++
1 file changed, 7
On Fri, Mar 3, 2017 at 3:26 AM, Julia Lawall wrote:
>> @@ -635,7 +635,7 @@ void r8712_reordering_ctrl_timeout_handler(void
>> *pcontext)
>> {
>> unsigned long irql;
>> struct recv_reorder_ctrl *preorder_ctrl =
>> - (struct recv_reorder_ctrl *)pcontext;
>>
On Fri, Mar 3, 2017 at 3:29 AM, Joe Perches wrote:
> On Fri, 2017-03-03 at 03:25 +0530, SIMRAN SINGHAL wrote:
>> On Fri, Mar 3, 2017 at 3:13 AM, Joe Perches wrote:
>> > On Fri, 2017-03-03 at 02:49 +0530, simran singhal wrote:
>> > > The following Coccinelle
On Fri, Mar 3, 2017 at 3:26 AM, Julia Lawall wrote:
>> diff --git a/drivers/staging/rts5208/rtsx_transport.c
>> b/drivers/staging/rts5208/rtsx_transport.c
>> index 2379901..d745b93 100644
>> --- a/drivers/staging/rts5208/rtsx_transport.c
>> +++ b/drivers/staging/rts5208/rtsx_transport.c
>> @@ -76
On Fri, Mar 3, 2017 at 3:13 AM, Joe Perches wrote:
> On Fri, 2017-03-03 at 02:49 +0530, simran singhal wrote:
>> The following Coccinelle script was used to detect this:
>> @r@
>> expression x;
>> void* e;
>> type T;
>> identifier f;
>>
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/staging/lustre/lustre/llite/range_lock.c | 2 +-
drivers/staging/lustre/lustre/
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/staging/nvec/nvec_kbd.c | 2 +-
1 file changed, 1 insertion(+), 1 delet
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/staging/rtl8712/rtl8712_recv.c | 10 +-
1 file changed, 5 insertions(+)
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/staging/rts5208/rtsx_transport.c | 2 +-
1 file changed, 1 insertion(+)
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/staging/lustre/lustre/lmv/lmv_obd.c | 4 ++--
1 file changed, 2 insertions(+)
This patch removes unnecessary typecast of c90 int constant.
WARNING: Unnecessary typecast of c90 int constant
Signed-off-by: simran singhal
---
drivers/staging/media/atomisp/i2c/gc2235.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/media/atomisp
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/staging/nvec/nvec_kbd.c | 2 +-
1 file changed, 1 insertion(+), 1 delet
__le16
And added space before '|'
Signed-off-by: simran singhal
---
drivers/staging/rtl8192u/r8192U_dm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_dm.c
b/drivers/staging/rtl8192u/r8192U_dm.c
index 9209aad..e1c83a3 100644
---
Remove unneeded blank lines preceding/following '}' and '{' braces, as
pointed out by checkpatch.
This patch addresses the following checkpatch checks:
CHECK: Blank lines aren't necessary before a close brace '}'
CHECK: Blank lines aren't necessary after
Use x instead of x != NULL .
This patch removes the explicit NULL comparisons.This issue is found by
checkpatch.pl script.
Signed-off-by: simran singhal
---
drivers/staging/media/atomisp/i2c/gc2235.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/media
Remove multiple assignments by factorizing them. Problem found using
checkpatch.pl
CHECK: multiple assignments should be avoided
Signed-off-by: simran singhal
---
drivers/staging/media/atomisp/i2c/gc2235.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging
Remove multiple blank lines. Problem found using checkpatch.pl
"CHECK: Please don't use multiple blank lines".
Signed-off-by: simran singhal
---
drivers/staging/media/atomisp/i2c/gc2235.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/media/atomisp/i2c/gc22
Use ! in comparison tests using "==NULL" rather than moving the
"==NULL" to the right side of the test.
Addesses multiple instances of the checkpatch.pl warning:
WARNING: Comparisons should place the constant on the right side of the
test
Signed-off-by: simran singhal
---
d
Resolve strict checkpatch USLEEP_RANGE checks by converting delays and
sleeps as described in ./Documentation/timers/timers-howto.txt.
CHECK: usleep_range is preferred over udelay; see Documentation/
timers/timers-howto.txt
Signed-off-by: simran singhal
---
drivers/staging/nvec/nvec.c | 4
:got restricted __le16
[usertype]
Signed-off-by: simran singhal
---
drivers/staging/wlan-ng/hfa384x_usb.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c
b/drivers/staging/wlan-ng/hfa384x_usb.c
index 6134eba..a7ff572 100644
This patch fixes the following Sparse warnings:-
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c:177:16: warning: cast
to restricted __le16
Signed-off-by: simran singhal
---
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
restricted __be64 [usertype]
Signed-off-by: simran singhal
---
v2:
-changed commit message
drivers/staging/fbtft/fbtft-bus.c | 2 +-
drivers/staging/fbtft/fbtft-io.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft-bus.c
b/drivers
/wlan-ng/hfa384x_usb.c:3527:34:got restricted __be32
[usertype]
Signed-off-by: simran singhal
---
v2:
-changed commit message
drivers/staging/wlan-ng/hfa384x_usb.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/wlan-ng
: simran singhal
---
drivers/staging/fbtft/fbtft-bus.c | 2 +-
drivers/staging/fbtft/fbtft-io.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft-bus.c
b/drivers/staging/fbtft/fbtft-bus.c
index ec45043..df2223e 100644
--- a/drivers/staging/fbtft/fbtft
On Thu, Mar 2, 2017 at 3:20 PM, Julia Lawall wrote:
>
>
> On Thu, 2 Mar 2017, Julia Lawall wrote:
>
>>
>>
>> On Thu, 2 Mar 2017, simran singhal wrote:
>>
>> > This patch fixes the following sparse warning:
>> > warning: cast to restricted __l
__be32
[usertype]
Signed-off-by: simran singhal
---
drivers/staging/wlan-ng/hfa384x_usb.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c
b/drivers/staging/wlan-ng/hfa384x_usb.c
index a7ff572..cdf987b 100644
--- a
On Tue, Feb 28, 2017 at 2:45 AM, Julia Lawall wrote:
>
>
> On Mon, 27 Feb 2017, simran singhal wrote:
>
>> This patch fixes the checkpatch warning that else is not generally
>> useful after a break or return.
>>
>> This was done using Coccinelle:
>
On Wed, Mar 1, 2017 at 1:04 AM, Lars-Peter Clausen wrote:
> On 02/28/2017 08:32 PM, SIMRAN SINGHAL wrote:
>> On Wed, Mar 1, 2017 at 12:53 AM, Jonathan Cameron wrote:
>>> On 28/02/17 19:17, Jonathan Cameron wrote:
>>>> On 28/02/17 18:51, simran singhal wrote:
>>
On Tue, Feb 28, 2017 at 2:49 AM, Julia Lawall wrote:
>
>
> On Mon, 27 Feb 2017, simran singhal wrote:
>
>> This patch fixes the checkpatch warning that else is not generally
>> useful after a break or return.
>>
>> This was done using Coccinelle:
>
On Tue, Feb 28, 2017 at 1:49 AM, SIMRAN SINGHAL
wrote:
> On Tue, Feb 28, 2017 at 1:11 AM, Joe Perches wrote:
>> On Mon, 2017-02-27 at 23:44 +0530, simran singhal wrote:
>>> This patch fixes the checkpatch warning that else is not generally
>>> useful after a break or r
The contents of the header file are used only by this single
source file. Move content into .c and remove .h.
Signed-off-by: simran singhal
---
v3:
-Removing endif as it is not needed
-Changing subject
drivers/staging/iio/accel/adis16201.h | 144
On Wed, Mar 1, 2017 at 12:53 AM, Jonathan Cameron wrote:
> On 28/02/17 19:17, Jonathan Cameron wrote:
>> On 28/02/17 18:51, simran singhal wrote:
>>> The contents of the header file are used only by this single
>>> source file. Move content into .c and remove .h.
&g
On Tue, Feb 28, 2017 at 2:13 AM, Joe Perches wrote:
> On Tue, 2017-02-28 at 01:51 +0530, SIMRAN SINGHAL wrote:
>> On Tue, Feb 28, 2017 at 12:55 AM, Joe Perches wrote:
>> > On Mon, 2017-02-27 at 23:44 +0530, simran singhal wrote:
>> > > This patch fixes the check
On Wed, Mar 1, 2017 at 12:30 AM, Julia Lawall wrote:
>
>
> On Wed, 1 Mar 2017, SIMRAN SINGHAL wrote:
>
>> On Tue, Feb 28, 2017 at 2:45 AM, Julia Lawall wrote:
>> >
>> >
>> > On Mon, 27 Feb 2017, simran singhal wrote:
>> >
>> >>
The contents of the header file are used only by this single
source file. Move content into .c and remove .h.
Signed-off-by: simran singhal
---
v2:
-Removing ifndef and define
drivers/staging/iio/accel/adis16201.h | 144 -
drivers/staging/iio/accel
On Tue, Feb 28, 2017 at 1:11 AM, Joe Perches wrote:
> On Mon, 2017-02-27 at 23:44 +0530, simran singhal wrote:
>> This patch fixes the checkpatch warning that else is not generally
>> useful after a break or return.
>
>> This was done using Coccinelle:
>> @@
>
On Tue, Feb 28, 2017 at 1:01 AM, Joe Perches wrote:
> On Mon, 2017-02-27 at 23:44 +0530, simran singhal wrote:
>> This patch fixes the checkpatch warning that else is not generally
>> useful after a break or return.
> []
>> diff --git a/drivers/staging/sm750fb/ddk750_swi2c
On Tue, Feb 28, 2017 at 12:55 AM, Joe Perches wrote:
> On Mon, 2017-02-27 at 23:44 +0530, simran singhal wrote:
>> This patch fixes the checkpatch warning that else is not generally
>> useful after a break or return.
>
> checkpatch doesn't actually warn for this
The contents of the header file are used only by this single
source file. Move content into .c and remove .h.
Signed-off-by: simran singhal
---
drivers/staging/iio/accel/adis16201.h | 144
drivers/staging/iio/accel/adis16201_core.c | 145
This patch fixes the checkpatch warning that else is not generally
useful after a break or return.
This was done using Coccinelle:
@@
expression e2;
statement s1;
@@
if(e2) { ... return ...; }
-else
s1
Signed-off-by: simran singhal
---
drivers/staging/rtl8192u/ieee80211
This patch fixes the checkpatch warning that else is not generally
useful after a break or return.
This was done using Coccinelle:
@@
expression e2;
statement s1;
@@
if(e2) { ... return ...; }
-else
s1
Signed-off-by: simran singhal
---
drivers/staging/gdm724x/gdm_endian.c | 12
This patch fixes the checkpatch warning that else is not generally
useful after a break or return.
This was done using Coccinelle:
@@
expression e2;
statement s1;
@@
if(e2) { ... return ...; }
-else
s1
Signed-off-by: simran singhal
---
drivers/staging/rtl8712/os_intfs.c | 3 +--
1
This patch fixes the checkpatch warning that else is not generally
useful after a break or return.
@@
expression e2;
statement s1;
@@
if(e2) { ... return ...; }
-else
s1
Signed-off-by: simran singhal
---
drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 3 +--
drivers/staging
This patch fixes the checkpatch warning that else is not generally
useful after a break or return.
This was done using Coccinelle:
@@
expression e2;
statement s1;
@@
if(e2) { ... return ...; }
-else
s1
Signed-off-by: simran singhal
---
drivers/staging/sm750fb/ddk750_sii164.c | 6
On Fri, Feb 24, 2017 at 10:47 PM, Greg KH wrote:
> On Mon, Feb 20, 2017 at 10:41:47PM +0530, simran singhal wrote:
>> Extra parentheses were causing checkpatch issues
>> and were removed.
>>
>> Signed-off-by: simran singhal
>> ---
>>
>> v2:
>&
(e1,e2)
)
Signed-off-by: simran singhal
---
v2:
-Removed unnecessary parantheses from the right side of
assignment.
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 +-
drivers/staging/lustre/lnet/selftest/conrpc.c | 11 ---
drivers/staging/lustre/lustre/ptlrpc
(e1,e2)
)
Signed-off-by: simran singhal
---
v2:
-Included kernel.h as DIV_ROUND_UP is defined in it,
before it was giving compilation error.
drivers/staging/most/hdm-dim2/dim2_hal.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/most/hdm-dim2
Removed initialisation of a varible if it is immediately reassigned.
Changes were made using Coccinelle.
@@
type T;
constant C;
expression e;
identifier i;
@@
T i
- = C
;
i = e;
Signed-off-by: simran singhal
---
drivers/staging/gdm724x/gdm_lte.c | 2 +-
drivers/staging/gdm724x/gdm_mux.c | 4
(e1,e2)
)
Signed-off-by: simran singhal
---
drivers/staging/most/hdm-dim2/dim2_hal.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.c
b/drivers/staging/most/hdm-dim2/dim2_hal.c
index 0b9816c..6824826 100644
--- a/drivers/staging
(e1,e2)
)
Signed-off-by: simran singhal
---
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 +-
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/vc04_services/interface
(e1,e2)
)
Signed-off-by: simran singhal
---
drivers/staging/comedi/drivers/addi_apci_3xxx.c | 2 +-
drivers/staging/comedi/drivers/cb_pcidas64.c| 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/addi_apci_3xxx.c
b/drivers/staging/comedi
(e1,e2)
)
Signed-off-by: simran singhal
---
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 +-
drivers/staging/lustre/lnet/selftest/conrpc.c | 11 ---
drivers/staging/lustre/lustre/ptlrpc/client.c | 3 +--
drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 2
Removed initialisation of a varible if it is immediately reassigned.
Changes were made using Coccinelle.
@@
type T;
constant C;
expression e;
identifier i;
@@
T i
- = C
;
i = e;
Signed-off-by: simran singhal
---
drivers/staging/android/ion/ion_heap.c | 2 +-
drivers/staging
This patch removes braces for single statement blocks. The warning
was detected using checkpatch.pl.
Coccinelle was used to make the change.
@@
expression e,e1;
@@
- if (e) {
+ if (e)
e1;
- }
Signed-off-by: simran singhal
---
v2:
-I forgot to cc outreachy mailing list
drivers/staging
This patch removes braces for single statement blocks. The warning
was detected using checkpatch.pl.
Coccinelle was used to make the change.
@@
expression e,e1;
@@
- if (e) {
+ if (e)
e1;
- }
Signed-off-by: simran singhal
---
drivers/staging/greybus/audio_manager_sysfs.c | 3 +--
drivers
Extra parentheses were causing checkpatch issues
and were removed.
Signed-off-by: simran singhal
---
v2:
-Removed parentheses around argument of cast
-Removed cast
drivers/staging/rtl8192e/rtl819x_HTProc.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
Change null comparisons of the form x == NULL to !x.
This was done using Coccinelle.
@@ expression e;
@@
- e == NULL
+ !e
Signed-off-by: simran singhal
---
drivers/staging/rtl8192e/rtl819x_TSProc.c| 2 +-
drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 2 +-
drivers/staging/rtl8192e
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
---
v2:
-Removed assignment
v3:
-Removed declaration of qwTSFOffset
Coccinelle
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: simran singhal
---
v2:
-Removed assignment
drivers/staging/vt6655/card.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/vt6655/card.c b/drivers
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/vt6655/card.c | 2 +-
1 file changed, 1 insertion(+), 1
Align * on last line, to conform to the kernal coding
style for block comments.
Signed-off-by: simran singhal
---
v2:
-Modified commit message
drivers/staging/rtl8192e/rtl819x_HT.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h
b
Extra parentheses were causing checkpatch issues
and were removed.
Signed-off-by: simran singhal
---
drivers/staging/rtl8192e/rtl819x_HTProc.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c
b/drivers/staging/rtl8192e
This patch fixes the checkpatch.pl issue:
Please don't use multiple blank lines
Signed-off-by: simran singhal
---
drivers/staging/rtl8192e/rtl819x_HT.h | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h
b/drivers/staging/rtl8192e/rtl819x_HT.h
Remove blank line after opening brace to fix the
checkpatch issue blank lines aren't necessary after
a open brace '{'.
Signed-off-by: simran singhal
---
drivers/staging/rtl8192e/rtl819x_HT.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl819x_
Align * on a line, to conform to the kernal coding
style for block comments.
Signed-off-by: simran singhal
---
drivers/staging/rtl8192e/rtl819x_HT.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h
b/drivers/staging/rtl8192e/rtl819x_HT.h
201 - 300 of 372 matches
Mail list logo