openwrt/staging/blogic.git
9 years agoStaging: rtl8712: Eliminate use of _cancel_timer_ex
Vaishali Thakkar [Fri, 6 Mar 2015 10:53:35 +0000 (16:23 +0530)]
Staging: rtl8712: Eliminate use of _cancel_timer_ex

Use timer API function del_timer_sync instead of driver
specific function _cancel_timer_ex as besides deactivating
a timer, it ensures that the timer is stopped on all
CPUs before the driver exists. Also, definition of function
_cancel_timer_ex 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; @@

- _cancel_timer_ex (&x);
+ del_timer_sync (&x);

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: skein: Remove do-while(0) from single statement macros
Vatika Harlalka [Sat, 14 Mar 2015 10:19:30 +0000 (15:49 +0530)]
Staging: skein: Remove do-while(0) from single statement macros

Remove unneeded do-while(0) loop from single statement macros.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: remove break after return
Supriya Karanth [Fri, 13 Mar 2015 12:00:20 +0000 (21:00 +0900)]
staging: comedi: remove break after return

Remove "break" statement after a "return" statement as
it does not get executed.

Deadcode found by coccinelle --debug option

Signed-off-by: Supriya Karanth <iskaranth@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: comedi: Remove parentheses around right side assignment
Haneen Mohammed [Fri, 13 Mar 2015 11:29:30 +0000 (14:29 +0300)]
Staging: comedi: Remove parentheses around right side assignment

Parentheses are not needed around the right hand side of an assignment.
This patch remove parenthese of such occurences. Issue was detected and
solved using the following coccinelle script:

@rule1@
identifier x, y, z;
expression E1, E2;
@@

(
x = (y == z);
|
x = (E1 == E2);
|
 x =
-(
...
-)
 ;
)

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: comedi: Use function setup_timer for combining initialization
Somya Anand [Wed, 11 Mar 2015 11:32:13 +0000 (17:02 +0530)]
Staging: comedi: Use function setup_timer for combining initialization

The function setup_timer combines the initialization of a timer with the
initialization of the timer's function and data fields.

So, this patch combines the multiline code for timer initialization using the function
setup_timer. This issue is identified via coccinelle script.

@@
expression E1, E2, E3;
type T;
@@
- init_timer(&E1);
...
(
- E1.function = E2;
...
- E1.data = (T)E3;
+ setup_timer(&E1, E2, (T)E3);
|
- E1.data = (T)E3;
...
- E1.function = E2;
+ setup_timer(&E1, E2, (T)E3);
|
- E1.function = E2;
+ setup_timer(&E1, E2, 0);
)

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove parantheses from return statements
Supriya Karanth [Sat, 14 Mar 2015 12:55:11 +0000 (21:55 +0900)]
staging: sm750fb: remove parantheses from return statements

found by checkpatch.pl :ERROR: return is not a function,
parentheses are not required

changes made using coccinelle script:

@@
expression e,e1;
@@
(
return (e / e1);
|
return
-(
e
-)
;
)

Signed-off-by: Supriya Karanth <iskaranth@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: sm750fb: Add space after ','
Somya Anand [Thu, 12 Mar 2015 16:18:45 +0000 (21:48 +0530)]
Staging: sm750fb: Add space after ','

This patch adds space after ',' for the better readability of
code. This issue is detected by checkpatch.pl

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove intialization of static ints
Supriya Karanth [Thu, 12 Mar 2015 04:26:21 +0000 (13:26 +0900)]
staging: sm750fb: remove intialization of static ints

static ints are initialized to 0 by the compiler.
Explicit initialization is not necessary.

Found by checkpatch.pl - ERROR: do not initialise statics to 0 or NULL

changes made using coccinelle script:
@@
type T;
identifier var;
@@
static T var
- =0
;

Signed-off-by: Supriya Karanth <iskaranth@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: Add void to function definition with no arguments
Supriya Karanth [Wed, 11 Mar 2015 16:11:00 +0000 (01:11 +0900)]
staging: sm750fb: Add void to function definition with no arguments

Found by checkpatch.pl - ERROR: Bad function definition

A function with no arguments allows for variadic arguments. Add
void in between the empty parentheses to indicate that the function
takes no arguments.

changes made using coccinelle script:
@@
type T;
identifier f;
@@
T f(
+void
 ) {
...
}

Signed-off-by: Supriya Karanth <iskaranth@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750: Fix switch-case indentation
Ioana Ciornei [Wed, 11 Mar 2015 02:35:04 +0000 (04:35 +0200)]
staging: sm750: Fix switch-case indentation

Remove switch cases indentation in order to follow the Linux coding style.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: goldfish: remove extra parentheses around function arguments
Aya Mahfouz [Tue, 10 Mar 2015 17:09:10 +0000 (19:09 +0200)]
staging: goldfish: remove extra parentheses around function arguments

Removes extra parentheses around function arguments. Issue
detected and resolved using the following coccinelle script:

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fbtft_device.c: remove extra parentheses around function arguments
Aya Mahfouz [Tue, 10 Mar 2015 17:08:40 +0000 (19:08 +0200)]
staging: fbtft: fbtft_device.c: remove extra parentheses around function arguments

Removes extra parentheses around function arguments. Issue
detected and resolved using the following coccinelle script:

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fbtft-io.c: remove extra parentheses around function arguments
Aya Mahfouz [Tue, 10 Mar 2015 17:08:15 +0000 (19:08 +0200)]
staging: fbtft: fbtft-io.c: remove extra parentheses around function arguments

Removes extra parentheses around function arguments. Issue
detected and resolved using the following coccinelle script:

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fb_st7735r.c: remove extra parentheses around function arguments
Aya Mahfouz [Tue, 10 Mar 2015 17:07:01 +0000 (19:07 +0200)]
staging: fbtft: fb_st7735r.c: remove extra parentheses around function arguments

Removes extra parentheses around function arguments. Issue
detected and resolved using the following coccinelle script:

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fb_s6d02a1.c: remove extra parentheses around function arguments
Aya Mahfouz [Tue, 10 Mar 2015 17:06:24 +0000 (19:06 +0200)]
staging: fbtft: fb_s6d02a1.c: remove extra parentheses around function arguments

Removes extra parentheses around function arguments. Issue
detected and resolved using the following coccinelle script:

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fb_hx8353d.c: remove extra parentheses around function arguments
Aya Mahfouz [Tue, 10 Mar 2015 17:05:52 +0000 (19:05 +0200)]
staging: fbtft: fb_hx8353d.c: remove extra parentheses around function arguments

Removes extra parentheses around function arguments. Issue
detected and resolved using the following coccinelle script:

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fb_hx8340bn.c: remove extra parentheses around function arguments
Aya Mahfouz [Tue, 10 Mar 2015 17:05:27 +0000 (19:05 +0200)]
staging: fbtft: fb_hx8340bn.c: remove extra parentheses around function arguments

Removes extra parentheses around function arguments. Issue
detected and resolved using the following coccinelle script:

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fb_agm1264k-fl.c: remove extra parentheses around function arguments
Aya Mahfouz [Tue, 10 Mar 2015 17:04:35 +0000 (19:04 +0200)]
staging: fbtft: fb_agm1264k-fl.c: remove extra parentheses around function arguments

Removes extra parentheses around function arguments. Issue
detected and resolved using the following coccinelle script:

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ft1000: ft1000-usb: ft1000_hw.c: adjust function arguments
Aya Mahfouz [Tue, 10 Mar 2015 17:04:09 +0000 (19:04 +0200)]
staging: ft1000: ft1000-usb: ft1000_hw.c: adjust function arguments

Handles the following issues:

Removing extra parentheses around function arguments,
Removing unnecessary pointer to pointer casts.

Issues were detected using the following coccinelle script:

@@
expression e;
type t;
identifier f;
@@

f(...,
-(t *)
e
,...)

@@
expression e;
identifier f;
@@

f(...,
&
-(
e
-)
,...)

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Parentheses removal were left to the script. However, there were some
cases that were handled manually. In addition, handling pointer casts
were done manually too because not all replacements generated by the
script were suitable. When pointer casts on function arguments were
in the form:
    <func>(...,(<type> *)&<expression>,...)

the replacements were discarded due to compilation warnings.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ft1000: ft1000-usb: ft1000_download.c: adjust function arguments
Aya Mahfouz [Tue, 10 Mar 2015 17:03:18 +0000 (19:03 +0200)]
staging: ft1000: ft1000-usb: ft1000_download.c: adjust function arguments

Handles the following issues:

Removing extra parentheses around function arguments,
Removing unnecessary pointer to pointer cast.

Issues were detected using the following coccinelle script:

@@
expression e;
type t;
identifier f;
@@

f(...,
-(t *)
e
,...)

@@
expression e;
identifier f;
@@

f(...,
&
-(
e
-)
,...)

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Parentheses removal were left to the script. However, handling pointer
casts were done manually because not all replacements generated by the
script were suitable. In general, the following cases were discarded:

pointer casts in macros,
pointer casts on function arguments in the form of:
    <func>(...,(<type> *)&<expression>,...)

since both cases generated compilation warnings.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ft1000: ft1000-usb: adjust function arguments
Aya Mahfouz [Tue, 10 Mar 2015 17:02:29 +0000 (19:02 +0200)]
staging: ft1000: ft1000-usb: adjust function arguments

Handles the following issues:

Removing extra parentheses around function arguments,
Removing unnecessary pointer to pointer cast.

Issues were detected using the following coccinelle script:

@@
expression e;
type t;
identifier f;
@@

f(...,
-(t *)
e
,...)

@@
expression e;
identifier f;
@@

f(...,
&
-(
e
-)
,...)

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Parentheses removal were left to the script. However, handling pointer
casts were done manually because not all replacements generated by the
script were suitable. In general, the following cases were discarded:

pointer casts in macros,
pointer casts on function arguments in the form of:
    <func>(...,(<type> *)&<expression>,...)

since both cases generated compilation warnings.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ft1000: ft1000-pcmcia: adjust function arguments
Aya Mahfouz [Tue, 10 Mar 2015 17:01:41 +0000 (19:01 +0200)]
staging: ft1000: ft1000-pcmcia: adjust function arguments

Handles the following issues:

Removing extra parentheses around function arguments,
Removing unnecessary pointer to potinter cast.

Issues were detected using the following coccinelle
script:

@@
expression e;
type t;
identifier f;
@@

f(...,
-(t *)
e
,...)

@@
expression e;
identifier f;
@@

f(...,
&
-(
e
-)
,...)

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Parentheses removal were left to the script. However, handling pointer
casts were done manually because not all replacements generated by the
script were suitable. In general, the following cases were discarded:

pointer casts in macros,
pointer casts on function arguments in the form of:
<func>(...,(<type> *)&<expression>,...)

since both cases generated compilation warnings.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ft1000: adjust function arguments
Aya Mahfouz [Tue, 10 Mar 2015 17:00:53 +0000 (19:00 +0200)]
staging: ft1000: adjust function arguments

Handles the following issues:

Removing extra parentheses around function arguments,
Removing unnecessary pointer to pointer cast.

Issues detected and resolved using the following coccinelle
script:

@@
expression e;
type t;
identifier f;
@@

f(...,
-(t *)
e
,...)

@@
expression e;
identifier f;
@@

f(...,
&
-(
e
-)
,...)

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: mt29f_spinand: remove pointer to pointer cast in function argument
Aya Mahfouz [Tue, 10 Mar 2015 16:58:00 +0000 (18:58 +0200)]
staging: mt29f_spinand: remove pointer to pointer cast in function argument

Removes unnecessary pointer to pointer cast on function arguments.
It is worth noting that buf is already a u8 pointer.
Issue detected and resolved using the following coccinelle script:

@@
expression e;
type t;
identifier f;
@@

f(...,
-(t *)
e
,...)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: media: lirc: remove pointer to pointer cast on function arguments
Aya Mahfouz [Tue, 10 Mar 2015 16:57:25 +0000 (18:57 +0200)]
staging: media: lirc: remove pointer to pointer cast on function arguments

Removes pointer to pointer cast on function arguments. Issue
detected and resolved using the following coccinelle script:

@@
expression e;
type t;
identifier f;
@@

f(...,
-(t *)
e
,...)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: media: lirc: fix multiple issues with function arguments
Aya Mahfouz [Tue, 10 Mar 2015 16:56:37 +0000 (18:56 +0200)]
staging: media: lirc: fix multiple issues with function arguments

Handles the following issues:

Removing extra parentheses around function arguments,
Removing unnecessary pointer to pointer casts.

Issues detected and resolved using the following coccinelle
script:

@@
expression e;
type t;
identifier f;
@@

f(...,
-(t *)
e
,...)

@@
expression e;
identifier f;
@@

f(...,
&
-(
e
-)
,...)

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: media: lirc: remove unnecessary cast on function argument
Aya Mahfouz [Tue, 10 Mar 2015 16:55:27 +0000 (18:55 +0200)]
staging: media: lirc: remove unnecessary cast on function argument

Removes pointer to pointer cast on a function argument. Issue
detected and resolved using the following coccinelle script:

@@
expression e;
type t;
identifier f;
@@

f(...,
-(t *)
e
,...)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: media: lirc: lirc_imon.c: remove extra parentheses around function arguments
Aya Mahfouz [Tue, 10 Mar 2015 16:54:51 +0000 (18:54 +0200)]
staging: media: lirc: lirc_imon.c: remove extra parentheses around function arguments

Removes extra parentheses around function arguments. Issue
detected and resolved using the following coccinelle script:

@@
expression e;
identifier f;
@@

f(...,
&
-(
e
-)
,...)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fwserial: remove extra parentheses around function arguments
Aya Mahfouz [Tue, 10 Mar 2015 16:53:54 +0000 (18:53 +0200)]
staging: fwserial: remove extra parentheses around function arguments

Removes extra parentheses around function arguments. Issue
detected and resolved using the following coccinelle script:

@@
expression e;
identifier f;
@@

f(...,
-(
e
-)
,...);

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: Remove space to improve code style.
Vatika Harlalka [Tue, 10 Mar 2015 12:26:12 +0000 (17:56 +0530)]
Staging: lustre: Remove space to improve code style.

Remove space to improve code style and follow kernel
conventions.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: Use setup_timer to combine initialization
Somya Anand [Wed, 11 Mar 2015 11:32:15 +0000 (17:02 +0530)]
Staging: lustre: Use setup_timer to combine initialization

The function setup_timer combines the initialization of a timer with the
initialization of the timer's function and data fields.

So, this patch combines the multiline code for timer initialization using the function
setup_timer. This issue is identified via coccinelle script.

@@
expression E1, E2, E3;
type T;
@@
- init_timer(&E1);
...
(
- E1.function = E2;
...
- E1.data = (T)E3;
+ setup_timer(&E1, E2, (T)E3);
|
- E1.data = (T)E3;
...
- E1.function = E2;
+ setup_timer(&E1, E2, (T)E3);
|
- E1.function = E2;
+ setup_timer(&E1, E2, 0);
)

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: Iterate list using list_for_each_entry
Somya Anand [Fri, 13 Mar 2015 19:33:10 +0000 (01:03 +0530)]
Staging: lustre: Iterate list using list_for_each_entry

Code using doubly linked list is iterated generally  using list_empty and
list_entry functions, but it can be better written using list_for_each_entry
macro.

This patch replaces the while loop containing list_empty and list_entry with
list_for_each_entry and list_for_each_entry_safe. list_for_each_entry is a
macro which is used to iterate over a list of given type. So while loop used to
iterate over a list can be replaced with list_for_each_entry macro. However, if
list_del is used in the loop, then list_for_each_entry_safe is a better choice.
This transformation is done by using the following coccinelle script.

@ rule1 @
expression E1;
identifier I1, I2;
type T;
iterator name list_for_each_entry;
@@

- while (list_empty(&E1) == 0)
+ list_for_each_entry (I1, &E1, I2)
 {
...when != T *I1;
-  I1 = list_entry(E1.next, T, I2);
    ...when != list_del(...);
       when != list_del_init(...);
 }

@ rule2  @
expression E1;
identifier I1, I2;
type T;
iterator name list_for_each_entry_safe;
@@
   T *I1;
+  T *tmp;
  ...
- while (list_empty(&E1) == 0)
+ list_for_each_entry_safe (I1, tmp, &E1, I2)
 {
...when != T *I1;
-  I1 = list_entry(E1.next, T, I2);
    ...
 }

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: Remove parentheses around right side an assignment
Haneen Mohammed [Fri, 13 Mar 2015 17:48:53 +0000 (20:48 +0300)]
Staging: lustre: Remove parentheses around right side an assignment

Parentheses are not needed around the right hand side of an assignment.
This patch remove parenthese of such occurenses. Issue was detected and
solved using the following coccinelle script:

@rule1@
identifier x, y, z;
expression E1, E2;
@@

(
x = (y == z);
|
x = (E1 == E2);
|
 x =
-(
...
-)
 ;
)

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Replace printk() with netdev_dbg()
Cristina Opriceana [Mon, 9 Mar 2015 18:39:24 +0000 (20:39 +0200)]
Staging: rtl8192u: Replace printk() with netdev_dbg()

This patch replaces the printk() function with netdev_dbg() in order to
fix the following: "WARNING: printk() should include KERN_ facility level"
and "WARNING: line over 80 characters".

Issue found by checkpatch.pl

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Add function to improve code quality
Cristina Opriceana [Mon, 9 Mar 2015 18:38:48 +0000 (20:38 +0200)]
Staging: rtl8192u: Add function to improve code quality

This patch introduces a new function for the authentication response
error check in the  ieee80211_rx_frame_softmac() function to fix the
indentation problem. It also adds the iotAction variable in the new
function to fix the "more than 80 characters per line" warning.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: Remove unneeded return statement
Somya Anand [Mon, 9 Mar 2015 13:48:25 +0000 (19:18 +0530)]
Staging: rtl8188eu: Remove unneeded return statement

This patch removes unnecessary return statement from a void
function and hence make it more compatible.

This issue is identified by checkpatch.pl

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: Remove redundant local variable
Somya Anand [Mon, 9 Mar 2015 13:48:24 +0000 (19:18 +0530)]
Staging: rtl8188eu: Remove redundant local variable

This patch removes a redundant variable "val" and adds
inline return statements. It also adds a default case
to the switch statement which returns 0 to keep the logic
intact.

It also removes a redundant variable "inx" and adds inline
return statements.

This issue is identified by the following coccinelle script.
@@
expression ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: Fixes the checkpatch.pl warning
Himani Agrawal [Mon, 9 Mar 2015 14:09:50 +0000 (19:39 +0530)]
staging: vt6655: Fixes the checkpatch.pl warning

warning fixed:

WARNING: line over 80 characters

The function call containing several variables is broken to make it fit
in 80 characters.

Signed-off-by: Himani Agrawal <himani93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wlan-ng: Use kzalloc instead of kmalloc.
Navya Sri Nizamkari [Tue, 10 Mar 2015 12:25:40 +0000 (17:55 +0530)]
staging: wlan-ng: Use kzalloc instead of kmalloc.

This patch uses kzalloc instead of kmalloc function.
A coccinelle script was used to make this change.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: Use kzalloc instead of kmalloc.
Navya Sri Nizamkari [Tue, 10 Mar 2015 12:26:58 +0000 (17:56 +0530)]
staging: rtl8192u: Use kzalloc instead of kmalloc.

This patch uses kzalloc instead of kmalloc function.
A coccinelle script was used to make this change.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Use kzalloc instead of kmalloc.
Navya Sri Nizamkari [Tue, 10 Mar 2015 12:28:07 +0000 (17:58 +0530)]
staging: rtl8192e: Use kzalloc instead of kmalloc.

This patch uses kzalloc instead of kmalloc function.
A coccinelle script was used to make this change.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: Use kcalloc instead of kzalloc.
Navya Sri Nizamkari [Tue, 10 Mar 2015 11:57:27 +0000 (17:27 +0530)]
staging: rtl8188eu: Use kcalloc instead of kzalloc.

This patch uses kcalloc instead of kzalloc function.
A coccinelle script was used to make this change.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: Use kcalloc instead of kzalloc
Navya Sri Nizamkari [Tue, 10 Mar 2015 11:59:27 +0000 (17:29 +0530)]
staging: rtl8188eu: Use kcalloc instead of kzalloc

This patch uses kcalloc instead of kzalloc function.
A coccinelle script was used to make this change.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: Use kcalloc instead of kzalloc.
Navya Sri Nizamkari [Tue, 10 Mar 2015 12:02:50 +0000 (17:32 +0530)]
staging: iio: Use kcalloc instead of kzalloc.

This patch uses kcalloc instead of kzalloc function.
A coccinelle script was used to make this change.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: Use kcalloc instead of kzalloc
Navya Sri Nizamkari [Tue, 10 Mar 2015 12:04:29 +0000 (17:34 +0530)]
staging: iio: Use kcalloc instead of kzalloc

This patch uses kcalloc instead of kzalloc function.
A coccinelle script was used to make this change.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: media: Use kcalloc instead of kzalloc.
Navya Sri Nizamkari [Tue, 10 Mar 2015 12:05:57 +0000 (17:35 +0530)]
staging: media: Use kcalloc instead of kzalloc.

This patch uses kcalloc instead of kzalloc function.
A coccinelle script was used to make this change.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: media: Use kcalloc instead of kzalloc
Navya Sri Nizamkari [Tue, 10 Mar 2015 12:07:28 +0000 (17:37 +0530)]
staging: media: Use kcalloc instead of kzalloc

This patch uses kcalloc instead of kzalloc function.
A coccinelle script was used to make this change.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Use kcalloc instead of kzalloc.
Navya Sri Nizamkari [Tue, 10 Mar 2015 12:08:52 +0000 (17:38 +0530)]
staging: unisys: Use kcalloc instead of kzalloc.

This patch uses kcalloc instead of kzalloc function.
A coccinelle script was used to make this change.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Use __packed instead of __attribute__((packed))
Cristina Opriceana [Mon, 9 Mar 2015 21:08:00 +0000 (23:08 +0200)]
Staging: rtl8192u: Use __packed instead of __attribute__((packed))

This patch fixed the following checkpatch.pl warning:
"WARNING: __packed is preferred over __attribute__((packed))".

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: fix space issue in workitem.c
Greg Kroah-Hartman [Fri, 13 Mar 2015 08:54:57 +0000 (09:54 +0100)]
Staging: lustre: fix space issue in workitem.c

This patch fixes a space issue in the workitem.c file

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: dgnc: Use goto for spinlock release before return
Quentin Lambert [Wed, 11 Mar 2015 14:22:01 +0000 (15:22 +0100)]
Staging: dgnc: Use goto for spinlock release before return

spin_unlock_irqrestore() is called at several
different places before exiting. This patch uses a goto statement
to factorize these calls.

Coccinelle was used to generate this patch.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: dgnc: Use goto for error handling
Quentin Lambert [Wed, 11 Mar 2015 14:22:00 +0000 (15:22 +0100)]
Staging: dgnc: Use goto for error handling

This patch introduces goto statments for error handling
and in cases where a lock needs to be released.

A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr)

@candidates exists@
identifier f, label;
statement s;
position p1, p2, p3;
@@

  f@p1(...) {
  ...when any

    if@p2(...) {
    ...when any
      s

      return@p3 ...;
    }
  ...when any
  }

@good1 exists@
identifier candidates.f, candidates.label;
statement candidates.s;
position candidates.p1, candidates.p2;
@@

  f@p1(...) {
  ...when any

    if(...) {
    ...when any
      s
      return ...;
    }
    ...when any

    if@p2(...) {...}
  ...when any
 }

@depends on good1@
identifier candidates.f, candidates.label;
position candidates.p1, candidates.p3;
@@

   f@p1(...) {
   ...when any
*  return@p3 ...;
  }

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: dgnc: Remove redundant parentheses
Somya Anand [Wed, 11 Mar 2015 11:32:12 +0000 (17:02 +0530)]
Staging: dgnc: Remove redundant parentheses

This patch removes the redundant parentheses inorder to make code
simplified. While doing this, the precedence order of the operation
is taken into consideration to keep the logic of the code intact.

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: dgnc: dgnc_driver: Add a missing call to dgnc_tty_uninit
Quentin Lambert [Wed, 11 Mar 2015 14:21:59 +0000 (15:21 +0100)]
Staging: dgnc: dgnc_driver: Add a missing call to dgnc_tty_uninit

This function is called on the previous and the next failure branches.
This patch adds the call on the branch where it seems to be missing.

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodgnc: clean up comments at start of files
Giedrius Statkevičius [Tue, 10 Mar 2015 19:29:20 +0000 (21:29 +0200)]
dgnc: clean up comments at start of files

Remove FSF address because it's known in the past that it has changed.
Also, remove the pointless "do not change the coding style" comments
because it's one of the reasons why it's in staging and it's quite
contradictory to what it says in TODO. Also, they contain wrong e-mails
of people which are responsible for these drivers - see TODO or
MAINTAINERS for that. We can preserve the original copyright at the top
of the most files because it shows who originally made them.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodgnc: Remove unneeded dgnc_state array of strings
Giedrius Statkevičius [Tue, 10 Mar 2015 19:29:18 +0000 (21:29 +0200)]
dgnc: Remove unneeded dgnc_state array of strings

Dgnc_state array of strings is never used anywhere and it seems pretty
useless anyway since the board state enum names speak for themselves.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: Use kcalloc instead of kzalloc.
Navya Sri Nizamkari [Tue, 10 Mar 2015 12:01:04 +0000 (17:31 +0530)]
staging: dgnc: Use kcalloc instead of kzalloc.

This patch uses kcalloc instead of kzalloc function.
A coccinelle script was used to make this change.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: off by one in dgnc_mgmt_ioctl()
Dan Carpenter [Tue, 10 Mar 2015 07:39:42 +0000 (10:39 +0300)]
staging: dgnc: off by one in dgnc_mgmt_ioctl()

"dgnc_NumBoards" is the number of initialized elements in the
dgnc_Board[] array so the comparison should be ">=" instead of ">" so we
don't read invalid data.  We can remove the special handling of the
empty array now that we've fixed this bug.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodgnc: Make all lines under 80 characters in dgnc_driver.c
Giedrius Statkevičius [Sun, 8 Mar 2015 23:49:46 +0000 (01:49 +0200)]
dgnc: Make all lines under 80 characters in dgnc_driver.c

Some of the lines are over 80 characters in dgnc_driver.c so fix them by
moving the comments closer to the code, tidying the comments to make
them smaller, and remove a redundant space after +.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodgnc: Make all lines under 80 characters in dgnc_cls.h
Giedrius Statkevičius [Sun, 8 Mar 2015 23:49:45 +0000 (01:49 +0200)]
dgnc: Make all lines under 80 characters in dgnc_cls.h

Some of the lines are over 80 characters so fix that by moving the
comments before the struct definition and before #define's.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodgnc: Remove redundant blank lines in dgnc_cls.c
Giedrius Statkevičius [Sun, 8 Mar 2015 23:49:44 +0000 (01:49 +0200)]
dgnc: Remove redundant blank lines in dgnc_cls.c

There are a lot double of blank lines in dgnc_cls.c thus remove them to make
the file follow the CodingStyle. Also, remove one blank line at the
end of dgnc_cls.c.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodgnc: Move DG_PART definition from Makefile to dgnc_driver.h
Cass May [Sun, 15 Feb 2015 23:40:18 +0000 (23:40 +0000)]
dgnc: Move DG_PART definition from Makefile to dgnc_driver.h

Avoid deprecated usage of EXTRA_CFLAGS by moving definition of DG_PART into dgnc_driver.h

Signed-off-by: Cass May <cass@cassm.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodgnc: Remove superfluous EXTRA_CFLAGS variable
Cass May [Sun, 15 Feb 2015 23:40:17 +0000 (23:40 +0000)]
dgnc: Remove superfluous EXTRA_CFLAGS variable

Clean up Makefile by removing unnecessary definition of DG_NAME.

Signed-off-by: Cass May <cass@cassm.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: sm750fb: provide error path for hw_sm750le_setBLANK()
Greg Kroah-Hartman [Tue, 10 Mar 2015 21:08:38 +0000 (22:08 +0100)]
Staging: sm750fb: provide error path for hw_sm750le_setBLANK()

This provides a default path for the switch statement in
hw_sm750le_setBLANK() so that the compiler will not correctly complain
about undefined values being sent to the hardware.

Instead, properly error out if the blank command is unknown by the
driver.

Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: sm750fb: fix hw_imageblit parameters
Greg Kroah-Hartman [Tue, 10 Mar 2015 21:03:01 +0000 (22:03 +0100)]
Staging: sm750fb: fix hw_imageblit parameters

Fix up hw_imageblit() so that the function paramaters match up with what
the driver expects them to be when using it as a function pointer.

Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: sm750fb: fix build warning with lynx_accel
Greg Kroah-Hartman [Tue, 10 Mar 2015 20:29:38 +0000 (21:29 +0100)]
Staging: sm750fb: fix build warning with lynx_accel

Change the return value of lynx_accel to be void, to fix the build
warning, and due to the fact that the function can't seem to fail at
all, and no one cares if it does or not.

Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
9 years agoStaging: sm750fb: fix build warning with proc_panDisplay
Greg Kroah-Hartman [Tue, 10 Mar 2015 20:20:52 +0000 (21:20 +0100)]
Staging: sm750fb: fix build warning with proc_panDisplay

Change the options to the proc_panDisplay function pointer to match the
function pointer that we want to assign to it, in order to remove the
build warning.

Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
9 years agostaging: sm750fb: Cleanup the type of mmio750
Lorenzo Stoakes [Tue, 10 Mar 2015 15:25:47 +0000 (15:25 +0000)]
staging: sm750fb: Cleanup the type of mmio750

This patch assigns the more appropriate void* type to the mmio750 variable
eliminating an unnecessary volatile qualifier in the process. Additionally it
updates parameter types as necessary where those parameters interact with
mmio750, removes unnecessary casts and updates the type of the
lynx_share->pvReg field which is passed to the ddk750_set_mmio method.

As a consequence, this patch fixes the following sparse warning:-

drivers/staging/sm750fb/ddk750_help.c:12:17: warning: incorrect type in assignment (different address spaces)

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: Use kzalloc rather than kmalloc followed by memset with 0
Madhusudhanan Ravindran [Tue, 10 Mar 2015 17:37:39 +0000 (23:07 +0530)]
staging: sm750fb: Use kzalloc rather than kmalloc followed by memset with 0

The semantic patch that makes this change is available
in scriptcoccinelle/api/alloc/kzalloc-simple.cocci.

Signed-off-by: Madhusudhanan Ravindran <mravindran04@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: correct integer comparison
Sudip Mukherjee [Tue, 10 Mar 2015 17:16:57 +0000 (22:46 +0530)]
staging: sm750fb: correct integer comparison

fixed the build warning about comparison of pointer and integer.
end of string was being compared to NULL.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: fix mixed declarations
Sudip Mukherjee [Tue, 10 Mar 2015 17:16:56 +0000 (22:46 +0530)]
staging: sm750fb: fix mixed declarations

we were getting build warning about mixed declaration. the variable
is now declared at the beginning of the block.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: correct function return
Sudip Mukherjee [Tue, 10 Mar 2015 17:16:54 +0000 (22:46 +0530)]
staging: sm750fb: correct function return

hw_cursor_setData2() is a function with void return type but it was
returning an integer.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove unused variables
Sudip Mukherjee [Tue, 10 Mar 2015 17:16:53 +0000 (22:46 +0530)]
staging: sm750fb: remove unused variables

removed some variables which were only declared but were never used.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove unused functions
Sudip Mukherjee [Tue, 10 Mar 2015 17:16:52 +0000 (22:46 +0530)]
staging: sm750fb: remove unused functions

removed the functions which were not used anywhere.
it has been build tested also confirmed with git grep that there is
no other reference of these functions.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: fix build failure
Sudip Mukherjee [Tue, 10 Mar 2015 08:45:39 +0000 (14:15 +0530)]
staging: sm750fb: fix build failure

for powerpc-allyesconfig build failed with an error of g_option
undeclared. we will get this error on all architecture if MODULE is
not defined. fixed the declaration of g_option.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: fix undeclared function
Sudip Mukherjee [Tue, 10 Mar 2015 08:45:38 +0000 (14:15 +0530)]
staging: sm750fb: fix undeclared function

kbuild test robot reported that for microblaze-allyesconfig
chan_to_field() and lynxfb_ops_set_par() were not defined. These two
functions were defined under CONFIG_PM, so for any archtecture if
CONFIG_PM is not defined we will have this error.

while moving the lynxfb_suspend() function some very obvious
checkpatch errors, like space after comma, space after if, space
before opening brace, were taken care of.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: correctly define SM750LE_REVISION_ID
Sudip Mukherjee [Tue, 10 Mar 2015 08:45:37 +0000 (14:15 +0530)]
staging: sm750fb: correctly define SM750LE_REVISION_ID

check if it is already defined before defining SM750LE_REVISION_ID
again and at the same time mention correct data type.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: remove pragma optimize
Sudip Mukherjee [Tue, 10 Mar 2015 08:45:36 +0000 (14:15 +0530)]
staging: sm750fb: remove pragma optimize

remove use of #pragma optimize which will usually be ignored by the
compiler.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: sm750fb: wrong type for print
Sudip Mukherjee [Tue, 10 Mar 2015 08:45:35 +0000 (14:15 +0530)]
staging: sm750fb: wrong type for print

mention correct format specifier while printing.
fixes all the build warnings about incorrect argument type while
printing.
since this is a framebuffer device and it should follow what the
framebuffer layer is suggesting in struct fb_fix_screeninfo at
smem_start and mmio_start, so accordingly changed the datatypes of
vidmem_start, vidreg_start, vidmem_size and vidreg_size.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Remove unnecessary macro definition
Cristina Opriceana [Mon, 9 Mar 2015 00:27:43 +0000 (02:27 +0200)]
Staging: rtl8192u: Remove unnecessary macro definition

This patch removes the IEEE80211_PRINT_STR macro definition because it appears
only in the header file and it doesn't serve any purpose in this context.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: iio: accel: Removed unnecessary variable
Tina Johnson [Mon, 9 Mar 2015 10:41:16 +0000 (16:11 +0530)]
drivers: staging: iio: accel: Removed unnecessary variable

Variable len is used only to store the return value. Hence len is
removed and the return statement modified. Coccinelle was used to
detect such removable variables:

@rule1@
identifier ret;
expression e;
@@

-ret =
+return
           e;
-return ret;

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: iio: meter: Removed unnecessary variable
Tina Johnson [Mon, 9 Mar 2015 10:41:17 +0000 (16:11 +0530)]
drivers: staging: iio: meter: Removed unnecessary variable

Variable len is used only to store the return value. Hence len is
removed and the return statement modified. Coccinelle was used to
detect such removable variables:

@rule1@
identifier ret;
expression e;
@@

-ret =
+return
           e;
-return ret;

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: iio: meter: Removed unnecessary variable
Tina Johnson [Mon, 9 Mar 2015 10:41:18 +0000 (16:11 +0530)]
drivers: staging: iio: meter: Removed unnecessary variable

Variable ret is used only to store the error code to be returned.
Hence use of ret is removed and the return statement modified.
Coccinelle was used to prepare the patch:

@rule1@
identifier ret;
expression e;
@@

-ret =
+return
        e;
-return ret;

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: iio: meter: Removed unnecessary variable
Tina Johnson [Mon, 9 Mar 2015 10:41:19 +0000 (16:11 +0530)]
drivers: staging: iio: meter: Removed unnecessary variable

Variable ret is used only to store the return value. Hence ret is
removed and the return statement modified. Coccinelle was used to
detect such removable variables:

@rule1@
identifier ret;
expression e;
@@

-ret =
+return
           e;
-return ret;

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: iio: meter: Removed unnecessary variable
Tina Johnson [Mon, 9 Mar 2015 10:41:20 +0000 (16:11 +0530)]
drivers: staging: iio: meter: Removed unnecessary variable

Variable ret is used only to store the return value. Hence ret is
removed and the return statement modified. Coccinelle was used to
detect such removable variables:

@rule1@
identifier ret;
expression e;
@@

-ret =
+return
           e;
-return ret;

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging rtl8172: Remove unnecessary typecast
Vatika Harlalka [Mon, 9 Mar 2015 08:54:42 +0000 (14:24 +0530)]
Staging rtl8172: Remove unnecessary typecast

Using addressof and then casting to the original type is unneeded.
So these casts can be removed.
Issue detected via Coccinelle script.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: rtl8723au: hal: Removed unnecessary parentheses
Tina Johnson [Mon, 9 Mar 2015 06:32:50 +0000 (12:02 +0530)]
drivers: staging: rtl8723au: hal: Removed unnecessary parentheses

Parentheses around the right side of an assignment statement are
unnecessary and hence removed. Coccinelle was used to produce the
patch:

@rule1@
identifier x,y;
constant c;
@@

(

 x =
-(
 y << c
-)
 ;
|
 x =
-(
 y >> c
-)
 ;
|
 x =
-(
 y + c
-)
 ;
|
 x =
-(
 y - c
-)
 ;

)

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: rtl8723au: core: Removed unnecessary parentheses
Tina Johnson [Mon, 9 Mar 2015 06:32:49 +0000 (12:02 +0530)]
drivers: staging: rtl8723au: core: Removed unnecessary parentheses

Parentheses around the right side of an assignment statement are
unnecessary and hence removed. Coccinelle was used to produce the
patch:

@rule1@
identifier x,y;
constant c;
@@

(

 x =
-(
 y << c
-)
 ;
|
 x =
-(
 y >> c
-)
 ;
|
 x =
-(
 y + c
-)
 ;
|
 x =
-(
 y - c
-)
 ;

)

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: rtl8712: Removed unnecessary parentheses
Tina Johnson [Mon, 9 Mar 2015 06:32:48 +0000 (12:02 +0530)]
drivers: staging: rtl8712: Removed unnecessary parentheses

Parentheses around the right side of an assignment statement are
unnecessary and hence removed. Coccinelle was used to produce the
patch:

@rule1@
identifier x,y;
constant c;
@@

(

 x =
-(
 y << c
-)
 ;
|
 x =
-(
 y >> c
-)
 ;
|
 x =
-(
 y + c
-)
 ;
|
 x =
-(
 y - c
-)
 ;

)

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: rtl8188eu: core: Removed unnecessary parentheses
Tina Johnson [Mon, 9 Mar 2015 06:32:47 +0000 (12:02 +0530)]
drivers: staging: rtl8188eu: core: Removed unnecessary parentheses

Parentheses around the right side of an assignment statement are
unnecessary and hence removed. Coccinelle was used to produce the
patch:

@rule1@
identifier x,y;
constant c;
@@

(

 x =
-(
 y << c
-)
 ;
|
 x =
-(
 y >> c
-)
 ;
|
 x =
-(
 y + c
-)
 ;
|
 x =
-(
 y - c
-)
 ;

)

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Replace #include <asm/string.h>
Dilek Uzulmez [Sat, 7 Mar 2015 21:33:25 +0000 (23:33 +0200)]
Staging: rtl8192u: Replace #include <asm/string.h>

The following patch fixes the checkpatch.pl warning:
WARNING: Use #include <linux/string.h> instead of #include <asm/string.h>

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Added #include <linux/string.h> instead of <asm/string.h>
Dilek Uzulmez [Sat, 7 Mar 2015 21:26:36 +0000 (23:26 +0200)]
Staging: rtl8192u: Added #include <linux/string.h> instead of <asm/string.h>

The following patch fixes the checkpatch.pl warning:
WARNING: Use #include <linux/string.h> instead of #include <asm/string.h>

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Added #include <linux/string.h> instead of <asm/string.h>
Dilek Uzulmez [Sat, 7 Mar 2015 21:15:39 +0000 (23:15 +0200)]
Staging: rtl8192u: Added #include <linux/string.h> instead of <asm/string.h>

The following patch fixes the checkpatch.pl warning:
WARNING: Use #include <linux/string.h> instead of #include <asm/string.h>

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: Replace min with min_t
Darshana Padmadas [Sun, 8 Mar 2015 18:03:40 +0000 (23:33 +0530)]
staging: rtl8192e: Replace min with min_t

This patch replaces min with min_t and eliminates the
following warnings found by checkpatch.pl:

WARNING: min() should probably be min_t

Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: dgnc: Replace min with min_t
Darshana Padmadas [Sun, 8 Mar 2015 18:03:39 +0000 (23:33 +0530)]
drivers: staging: dgnc: Replace min with min_t

This patch replaces min with min_t and eliminates
the following warning found by checkpatch.pl:

WARNING: min() should probably be min_t(uint, n, 12)

Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: speakup: Remove unused variable
Haneen Mohammed [Sat, 7 Mar 2015 21:03:51 +0000 (00:03 +0300)]
Staging: speakup: Remove unused variable

This patch removes variable that was used to store only the return value of a function call.

The issue was detected and resolved using the following coccinelle script:

@@
expression ret;
identifier f;
@@

 -ret =
 +return
    f(...);
 -return ret;

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: dgap: Remove unused variable
Haneen Mohammed [Sat, 7 Mar 2015 21:02:34 +0000 (00:02 +0300)]
Staging: dgap: Remove unused variable

This patch removes variable that was used to store only the return value of a function call.

The issue was detected and resolved using the following coccinelle script:

@@
expression ret;
identifier f;
@@

-ret =
+return
f(...);
-return ret;

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: Remove unneeded parentheses
Somya Anand [Sat, 7 Mar 2015 18:00:27 +0000 (23:30 +0530)]
staging: rtl8188eu: Remove unneeded parentheses

This patch removes unneeded parentheses from a if statement
for better readability.

This issue is identified by checkpatch.pl

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: iio: Change data type to u16 to avoid unnecessary typecast
Somya Anand [Sat, 7 Mar 2015 17:50:01 +0000 (23:20 +0530)]
Staging: iio: Change data type to u16 to avoid unnecessary typecast

In the adis16220_read16bit() function we earlier used a s16 value 'val'
which is used by the adis_read_reg_16 function to read data and takes a
u16 value as a parameter.

So, this patch changes the data type of 'val' from s16 to u16. It is safe
to remove the extra sign extension, since the user of the function uses it
to read a 10 unsigned value which will lead to the same result in both cases.
Further this patch removes the unnecessary typecast for the simplification of
code. In addition to this, initialization of 'val' to 0 is also dropped. This is
due to the fact that not initializing helps the compiler provide useful warnings
if the code gets changed to return an otherwise uninitialized result.

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoMerge 4.0-rc3 into staging-next
Greg Kroah-Hartman [Mon, 9 Mar 2015 07:13:01 +0000 (08:13 +0100)]
Merge 4.0-rc3 into staging-next

We want the staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>