staging: rtl8192u: r8192U_core: Fix driver_info dereference as a null pointer
Fix possible use of use of driver_info as a null pointer in
query_rxdesc_status()
This could happen if stats->RxIs40MHzPacket still has the
default value of zero.
Benjamin Romer [Wed, 4 Mar 2015 17:14:25 +0000 (12:14 -0500)]
staging: unisys: remove ERRDEV macros
Remove the LOGERR, LOGERRDEV, LOGERRDEVX, LOGERRNAME, LOGORDUMPERR
macros from all the drivers.
In one case the removal of the ERRDRV() changed things such that a macro which
returned a value was needed, but the return value was no longer being used. In
this case the macro was replaced with the contents of the macro, but with the
truth calculation removed so that it would not generate a warning.
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Drew Fustini [Wed, 4 Mar 2015 08:10:11 +0000 (02:10 -0600)]
Staging: fbtft: add header for internal functions
Remove extern keyword from function prototypes to suppress warning from
checkpatch.pl with --strict option: https://lkml.org/lkml/2013/7/23/422
fbtft maintainer Noralf Tronnes advised these functions are internal to
this module & suggested moving these prototypes to new internal.h file.
He also advised fbtft.h file will eventually live in include/linux/fbtft.h
Sudip Mukherjee [Tue, 3 Mar 2015 10:51:06 +0000 (16:21 +0530)]
staging: sm750fb: add sm750 to staging
sm750 of Silicon Motion is pci-e display controller device and has
features like dual display and 2D acceleration. This patch adds the
driver to staging.
staging: vt6656: Fix possible leak in vnt_download_firmware()
When failing to allocate buffer memory, function vnt_download_firmware() goes
through the wrong exit path and fails to release the already requested
firmware. Thus use the correct cleanup. Detected by Coverity CID 1269128.
Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Reviewed-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oleg Drokin [Mon, 2 Mar 2015 06:01:47 +0000 (01:01 -0500)]
staging/lustre/libcfs: replace deprecated cpus_ calls with cpumask_
Rusty Russel advises that cpus_* functions are deprecated to work
on cpumasks and cpumask_* functions should be called instead,
otherwise problems with CPUMASK_OFFSTACK arise.
Oleg Drokin [Mon, 2 Mar 2015 06:01:46 +0000 (01:01 -0500)]
staging/lustre/ptlrpc: Do not use deprecated cpus_* functions
As per Rusty Russel, cpus_* functions are deprecated.
When mixing cpumask_copy with cpus_weight, they operate on different
sized masks if CPUMASK_OFFSTACK is enabled, causing an
immediate assertion failure.
Copying of cpumasks by assignment is also not allowed now.
Additionally, in ptlrpc/service.c avoid the cpumask copies,
since we only use it to check how many siblings are there for
core #0 and nothing else.
Haneen Mohammed [Fri, 6 Mar 2015 19:07:13 +0000 (22:07 +0300)]
Staging: ste_rmi4: clean dev_err logging
This patch removes __func__ from dev_err. dev_err includes information about:
(devcice, driver, specific instance of device, etc) in the log printout.
This was done using Coccinelle, with the following semantic patch:
@a@
expression E, R;
expression msg;
@@
dev_err(E, msg, __func__, R);
@script:python b@
e << a.msg;
y;
@@
if(e.find("%s: ") == True):
m = e.replace("%s: ", "", 1);
coccinelle.y = m;
elif(e.find("%s ") == True):
m = e.replace("%s ", "", 1);
coccinelle.y = m;
elif(e.find("%s:") == True):
m = e.replace("%s:", "", 1);
coccinelle.y = m;
else:
m = e.replace("%s", "",1);
coccinelle.y = m;
Haneen Mohammed [Fri, 6 Mar 2015 19:05:05 +0000 (22:05 +0300)]
Staging: slicoss: clean dev_err logging
This patch removes __func__ from dev_err. dev_err includes information about:
(devcice, driver, specific instance of device, etc) in the log printout.
This was done using Coccinelle, with the following semantic patch:
@a@
expression E, R;
expression msg;
@@
dev_err(E, msg, __func__, R);
@script:python b@
e << a.msg;
y;
@@
if(e.find("%s: ") == True):
m = e.replace("%s: ", "", 1);
coccinelle.y = m;
elif(e.find("%s ") == True):
m = e.replace("%s ", "", 1);
coccinelle.y = m;
elif(e.find("%s:") == True):
m = e.replace("%s:", "", 1);
coccinelle.y = m;
else:
m = e.replace("%s", "",1);
coccinelle.y = m;
Haneen Mohammed [Fri, 6 Mar 2015 19:03:53 +0000 (22:03 +0300)]
Staging: iio: clean dev_err logging
This patch removes __func__ from dev_err. dev_err includes information about:
(devcice, driver, specific instance of device, etc) in the log printout.
This was done using Coccinelle, with the following semantic patch:
@a@
expression E, R;
expression msg;
@@
dev_err(E, msg, __func__, R);
@script:python b@
e << a.msg;
y;
@@
if(e.find("%s: ") == True):
m = e.replace("%s: ", "", 1);
coccinelle.y = m;
elif(e.find("%s ") == True):
m = e.replace("%s ", "", 1);
coccinelle.y = m;
elif(e.find("%s:") == True):
m = e.replace("%s:", "", 1);
coccinelle.y = m;
else:
m = e.replace("%s", "",1);
coccinelle.y = m;
Haneen Mohammed [Fri, 6 Mar 2015 19:03:05 +0000 (22:03 +0300)]
Staging: rts5208: clean dev_err logging
This patch removes __func__ from dev_err. dev_err includes information about:
(devcice, driver, specific instance of device, etc) in the log printout.
This was done using Coccinelle, with the following semantic patch:
@a@
expression E, R;
expression msg;
@@
dev_err(E, msg, __func__, R);
@script:python b@
e << a.msg;
y;
@@
if(e.find("%s: ") == True):
m = e.replace("%s: ", "", 1);
coccinelle.y = m;
elif(e.find("%s ") == True):
m = e.replace("%s ", "", 1);
coccinelle.y = m;
elif(e.find("%s:") == True):
m = e.replace("%s:", "", 1);
coccinelle.y = m;
else:
m = e.replace("%s", "",1);
coccinelle.y = m;
Haneen Mohammed [Fri, 6 Mar 2015 19:01:38 +0000 (22:01 +0300)]
Staging: comedi: clean dev_err logging
This patch removes __func__ from dev_err. dev_err includes information about:
(devcice, driver, specific instance of device, etc) in the log printout.
This was done using Coccinelle, with the following semantic patch:
@a@
expression E, R;
expression msg;
@@
dev_err(E, msg, __func__, R);
@script:python b@
e << a.msg;
y;
@@
if(e.find("%s: ") == True):
m = e.replace("%s: ", "", 1);
coccinelle.y = m;
elif(e.find("%s ") == True):
m = e.replace("%s ", "", 1);
coccinelle.y = m;
elif(e.find("%s:") == True):
m = e.replace("%s:", "", 1);
coccinelle.y = m;
else:
m = e.replace("%s", "",1);
coccinelle.y = m;
Haneen Mohammed [Fri, 6 Mar 2015 19:00:42 +0000 (22:00 +0300)]
Staging: gdm72xx: clean dev_err logging
This patch removes __func__ from dev_err. dev_err includes information about:
(devcice, driver, specific instance of device, etc) in the log printout.
This was done using Coccinelle, with the following semantic patch:
@a@
expression E, R;
expression msg;
@@
dev_err(E, msg, __func__, R);
@script:python b@
e << a.msg;
y;
@@
if(e.find("%s: ") == True):
m = e.replace("%s: ", "", 1);
coccinelle.y = m;
elif(e.find("%s ") == True):
m = e.replace("%s ", "", 1);
coccinelle.y = m;
elif(e.find("%s:") == True):
m = e.replace("%s:", "", 1);
coccinelle.y = m;
else:
m = e.replace("%s", "",1);
coccinelle.y = m;
Haneen Mohammed [Fri, 6 Mar 2015 19:00:10 +0000 (22:00 +0300)]
Staging: media: clean dev_err logging
This patch removes __func__ from dev_err. dev_err includes information about:
(devcice, driver, specific instance of device, etc) in the log printout.
This was done using Coccinelle, with the following semantic patch:
@a@
expression E, R;
expression msg;
@@
dev_err(E, msg, __func__, R);
@script:python b@
e << a.msg;
y;
@@
if(e.find("%s: ") == True):
m = e.replace("%s: ", "", 1);
coccinelle.y = m;
elif(e.find("%s ") == True):
m = e.replace("%s ", "", 1);
coccinelle.y = m;
elif(e.find("%s:") == True):
m = e.replace("%s:", "", 1);
coccinelle.y = m;
else:
m = e.replace("%s", "",1);
coccinelle.y = m;
Haneen Mohammed [Fri, 6 Mar 2015 18:59:04 +0000 (21:59 +0300)]
Staging: fbtft: clean dev_err() logging
This patch removes __func__ from dev_err. dev_err includes information about:
(devcice, driver, specific instance of device, etc) in the log printout.
This was done using Coccinelle, with the following semantic patch:
@a@
expression E, R;
expression msg;
@@
dev_err(E, msg, __func__, R);
@script:python b@
e << a.msg;
y;
@@
if(e.find("%s: ") == True):
m = e.replace("%s: ", "", 1);
coccinelle.y = m;
elif(e.find("%s ") == True):
m = e.replace("%s ", "", 1);
coccinelle.y = m;
elif(e.find("%s:") == True):
m = e.replace("%s:", "", 1);
coccinelle.y = m;
else:
m = e.replace("%s", "",1);
coccinelle.y = m;
Haneen Mohammed [Thu, 5 Mar 2015 10:01:49 +0000 (13:01 +0300)]
Staging: comedi: Clean dev_err() logging
This patch removes __func__ from dev_err. dev_err includes information about:
(devcice, driver, specific instance of device, etc) in the log printout, so there is no need for __func__.
This was done using Coccinelle, with the following semantic patch:
@a@
expression E;
expression msg;
@@
dev_err(E, msg, __func__);
@script:python b@
e << a.msg;
y;
@@
if(e.find("%s: ") == True):
m = e.replace("%s: ", "");
coccinelle.y = m;
elif(e.find("%s ") == True):
m = e.replace("%s ", "");
coccinelle.y = m;
else:
m = e.replace("%s", "");
@c@
expression a.E, a.msg;
identifier b.y;
@@
- dev_err(E, msg, __func__);
+ dev_err(E, y);
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Staging: drivers: Bool initializations should use true/false
This patch replaces bool initializations of 1/0 with true/false in order
to increase readability and respect the standards. Warning found by
coccinelle.
This patch removes if conditions with no exececutable
statements in the bodies of those ifs and also no variable
assignments in the if conditional checks. The call to
rtllib_act_scanning in the condition doesn't have any side
effects as it too performs conditional checks without changing
any values. Hence, it's safe to remove the if condition.
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 4 Mar 2015 07:00:02 +0000 (09:00 +0200)]
staging: rtl8712: replace memset(x,0,ETH_ALEN)
eth_zero_addr() is a wrapper function for memset if 0 is going to
be assigned to a mac address. The aforementioned function replaces
memset. In addition, linux/etherdevice.h was included as a header
since it is the file that defines the inline function eth_zero_addr().
The changes were carried out using the following coccinelle script:
Aya Mahfouz [Wed, 4 Mar 2015 06:56:45 +0000 (08:56 +0200)]
staging: rtl8188eu: replace memset(x,0,ETH_ALEN)
eth_zero_addr() is a wrapper function for memset if 0 is going to
be assigned to a mac address. The aforementioned function replaces
memset. In addition, linux/etherdevice.h was included as a header
since it is the file that define the inline function eth_zero_addr().
The changes were carried out using the following coccinelle script:
Aya Mahfouz [Wed, 4 Mar 2015 06:20:14 +0000 (08:20 +0200)]
staging: unisys: virthba: remove extra parentheses around left bit shift operations
Removes extra parentheses around bitwise left shift operations.
The case handled is when resultant value is assigned to a variable.
The issue was detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
<<
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
<<
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
<<
-c)
+c
,...);
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 4 Mar 2015 06:19:50 +0000 (08:19 +0200)]
staging: slicoss: remove extra parentheses around left bit shift operations
Removes extra parentheses around bitwise left shift operations.
The case handled is when resultant value is assigned to a variable.
The issue was detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
<<
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
<<
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
<<
-c)
+c
,...);
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 4 Mar 2015 06:19:24 +0000 (08:19 +0200)]
staging: rts5208: remove extra parentheses around left bit shift operation
Removes extra parentheses around bitwise left shift operations.
The case handled is when resultant value is assigned to a variable.
The issue was detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
<<
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
<<
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
<<
-c)
+c
,...);
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 4 Mar 2015 06:18:47 +0000 (08:18 +0200)]
staging: ozwpan: remove extra parentheses around left bit shift operations
Removes extra parentheses around bitwise left shift operations.
The case handled is when resultant value is assigned to a variable.
The issue was detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
<<
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
<<
-c);
+c;
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 4 Mar 2015 06:18:19 +0000 (08:18 +0200)]
staging: lustre: remove extra parentheses around left bit shift operations
Removes extra parentheses around bitwise left shift operations.
The cases handled here are when resultant values are assigned to
variables. The issue was detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
<<
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
<<
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
<<
-c)
+c
,...);
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 4 Mar 2015 05:35:48 +0000 (07:35 +0200)]
staging: xgifb: remove extra parentheses around right bit shift operations
Removes extra parentheses around bitwise right shift operations.
The cases handled here are when resultant values are assigned to
variables. The issue was detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
>>
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
>>
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
>>
-c)
+c
,...);
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 4 Mar 2015 05:35:28 +0000 (07:35 +0200)]
staging: speakup: remove extra parentheses around right bit shift operation
Removes extra parentheses around bitwise right shift operation.
The case handled is when the resultant value is assigned to
a variable. The issue was detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
>>
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
>>
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
>>
-c)
+c
,...);
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 4 Mar 2015 05:34:52 +0000 (07:34 +0200)]
staging: slicoss: remove extra parentheses around right bit shift operations
Removes extra parentheses around bitwise right shift operations.
The cases handled here are when resultant values are assigned to
variables. The issue was detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
>>
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
>>
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
>>
-c)
+c
,...);
Some coding style issues were handled manually to avoid
checkpatch warnings and errors.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 4 Mar 2015 05:34:07 +0000 (07:34 +0200)]
staging: rtl8723au: remove extra parentheses around right bit shift operations
Removes extra parentheses around bitwise right shift operations.
The cases handled here are when resultant values are assigned to
variables. The issue was detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
>>
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
>>
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
>>
-c)
+c
,...);
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 4 Mar 2015 05:33:39 +0000 (07:33 +0200)]
staging: rtl8712: remove extra parentheses around right bit shift operation
Removes extra parentheses around bitwise right shift operation.
The cases handled are when the resultant value is assigned to
a variable or when a shift operation is carried out for a function
argument. The issues were detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
>>
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
>>
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
>>
-c)
+c
,...);
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 4 Mar 2015 05:33:06 +0000 (07:33 +0200)]
staging: rtl8192u: remove extra parentheses around right bit shift operation
Removes extra parentheses around bitwise right shift operation.
The cases handled are when the resultant value is assigned to
a variable or when a shift operation is carried out for a function
argument. The issues were detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
>>
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
>>
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
>>
-c)
+c
,...);
Some coding style issues were handled manually to avoid
checkpatch warnings and errors.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 4 Mar 2015 05:32:30 +0000 (07:32 +0200)]
staging: rtl8192e: remove extra parentheses around right bit shift operation
Removes extra parentheses around bitwise right shift operation.
The cases handled are when the resultant value is assigned to
a variable or when a shift operation is carried out for a function
argument. The issues were detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
>>
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
>>
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
>>
-c)
+c
,...);
Some coding style issues were handled manually to avoid
checkpatch warnings and errors.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 4 Mar 2015 05:31:56 +0000 (07:31 +0200)]
staging: rtl8188eu: remove extra parentheses around right bit shift operations
Removes extra parentheses around bitwise right shift operations.
The cases handled here are when resultant values are assigned to
variables. The issue was detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
>>
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
>>
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
>>
-c)
+c
,...);
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 4 Mar 2015 05:31:19 +0000 (07:31 +0200)]
staging: media: lirc: remove extra parentheses around right bit shift operation
Removes extra parentheses around bitwise right shift operation.
The case handled here is when the resultant value is assigned to
a variable. The issue was detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
>>
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
>>
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
>>
-c)
+c
,...);
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 4 Mar 2015 05:30:49 +0000 (07:30 +0200)]
staging: media: bcm2048: remove extra parentheses around right bit shift operation
Removes extra parentheses around bitwise right shift operation.
The case handled here is when the resultant value is assigned to
a variable. The issue was detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
>>
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
>>
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
>>
-c)
+c
,...);
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 4 Mar 2015 05:30:18 +0000 (07:30 +0200)]
staging: lustre: llite: remove extra parentheses around right bit shift operation
Removes extra parentheses around bitwise right shift operation.
The case handled here is when the resultant value is assigned to
a variable. The issue was detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
>>
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
>>
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
>>
-c)
+c
,...);
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Wed, 4 Mar 2015 05:29:28 +0000 (07:29 +0200)]
staging: lustre: lclient: remove extra parentheses around right bit shift operation
Removes extra parentheses around bitwise right shift operations.
The cases handled here are when the resultant value is assigned
to a variable. The issue was detected and resolved using the
following coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
>>
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
>>
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
>>
-c)
+c
,...);
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch introduces the use of API function setup_timer
instead of driver specific function _init_timer as it is
the preferred and standard way to setup and set the timer.
To be compatible with the change, argument types of
referenced functions are changed. Also, definition of
function _init_timer is removed as it is no longer needed
after this change.
This is done using Coccinelle and semantic patch used for
this is as follows:
@@ expression x, y; identifier a, b;@@
- _init_timer (&x, y, a, b);
+ setup_timer (&x, a, (unsigned long)b);
Aya Mahfouz [Tue, 3 Mar 2015 14:08:38 +0000 (16:08 +0200)]
staging: rtl8192u: ieee80211: replace memset(x,0,ETH_ALEN) by eth_zero_addr(x)
eth_zero_addr() is a wrapper function for memset if 0 is going to
be assigned to a mac address. The replacement was done by the
following coccinelle script:
Aya Mahfouz [Tue, 3 Mar 2015 14:06:19 +0000 (16:06 +0200)]
staging: rtl8192u: replace memset(x,0,ETH_ALEN) by eth_zero_addr(x)
eth_zero_addr() is a wrapper function for memset if 0 is going to
be assigned to a mac address. The replacement was done by the
following coccinelle script:
Aya Mahfouz [Tue, 3 Mar 2015 14:04:20 +0000 (16:04 +0200)]
staging: rtl8192e: replace memset(x,0,ETH_ALEN) by eth_zero_addr(x)
eth_zero_addr() is a wrapper function for memset if 0 is going to
be assigned to a mac address. The replacement was done by the
following coccinelle script:
Aya Mahfouz [Tue, 3 Mar 2015 14:03:35 +0000 (16:03 +0200)]
staging: rtl8192e: replace memset(x,0,ETH_ALEN) by eth_zero_addr(x)
eth_zero_addr() is a wrapper function for memset if 0 is going to
be assigned to a mac address. The replacement was done by the
following coccinelle script: