openwrt/staging/blogic.git
9 years agoStaging: lustre: Corrected code indentation
aybuke ozdemir [Thu, 26 Feb 2015 21:45:46 +0000 (23:45 +0200)]
Staging: lustre: Corrected code indentation

This patch fixes these warning messages found by checkpatch.pl:
WARNING: suspect code indent for conditional statements(8,15)

Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: Added blank line after declarations
aybuke ozdemir [Thu, 26 Feb 2015 21:45:45 +0000 (23:45 +0200)]
Staging: lustre: Added blank line after declarations

This patch fixes "Missing a blank line after declarations"
checkpatch.pl warning in file.c

Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: lustre: Move export_symbol below its function
aybuke ozdemir [Thu, 26 Feb 2015 21:45:44 +0000 (23:45 +0200)]
Staging: lustre: Move export_symbol below its function

This patch fixes "EXPORT_SYMBOL(foo); should immediately follow its
function/variable" checkpatch.pl warning in file.c

Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: Remove unnecessary code
Vatika Harlalka [Thu, 26 Feb 2015 20:42:10 +0000 (02:12 +0530)]
Staging: rtl8188eu: Remove unnecessary code

Code removed as variables assigned are not used anywhere.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:46:12 +0000 (11:46 +0200)]
staging: comedi: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: emxx_udc: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:45:51 +0000 (11:45 +0200)]
staging: emxx_udc: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: Documentation: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:45:26 +0000 (11:45 +0200)]
staging: iio: Documentation: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: libcfs: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:45:03 +0000 (11:45 +0200)]
staging: lustre: libcfs: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: lmv: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:44:40 +0000 (11:44 +0200)]
staging: lustre: lmv: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: lustre: lov: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:44:18 +0000 (11:44 +0200)]
staging: lustre: lov: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: media: davinci_vpfe: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:43:54 +0000 (11:43 +0200)]
staging: media: davinci_vpfe: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:43:09 +0000 (11:43 +0200)]
staging: rtl8188eu: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:42:42 +0000 (11:42 +0200)]
staging: rtl8188eu: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:42:14 +0000 (11:42 +0200)]
staging: rtl8188eu: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8188eu: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:41:51 +0000 (11:41 +0200)]
staging: rtl8188eu: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:41:23 +0000 (11:41 +0200)]
staging: rtl8192e: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192e: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:40:50 +0000 (11:40 +0200)]
staging: rtl8192e: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:40:21 +0000 (11:40 +0200)]
staging: rtl8192u: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:39:17 +0000 (11:39 +0200)]
staging: rtl8192u: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:38:12 +0000 (11:38 +0200)]
staging: rtl8712: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:36:56 +0000 (11:36 +0200)]
staging: rtl8712: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:35:45 +0000 (11:35 +0200)]
staging: rtl8712: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:32:40 +0000 (11:32 +0200)]
staging: rtl8712: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: hal: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:31:42 +0000 (11:31 +0200)]
staging: rtl8723au: hal: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: hal: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:30:50 +0000 (11:30 +0200)]
staging: rtl8723au: hal: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: hal: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:30:01 +0000 (11:30 +0200)]
staging: rtl8723au: hal: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:29:04 +0000 (11:29 +0200)]
staging: rtl8723au: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: xgifb: rewrite the right hand side of an assignment
Aya Mahfouz [Thu, 26 Feb 2015 09:27:44 +0000 (11:27 +0200)]
staging: xgifb: rewrite the right hand side of an assignment

This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

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

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: slicoss: Join split string.
Ksenija Stanojevic [Mon, 23 Feb 2015 17:47:07 +0000 (18:47 +0100)]
Staging: slicoss: Join split string.

This patch fixes warning issue by checkpatch.pl by joining the split string.
And also creates new warning that line exceeds 80 characters. In this case
this is more beneficial because of possibility to grep the string.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: ft1000: Removed unnecessary braces
Yeliz Taneroglu [Thu, 26 Feb 2015 20:05:02 +0000 (22:05 +0200)]
Staging: ft1000: Removed unnecessary braces

The following patch fixes the checkpatch.pl warning:
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ft1000: ft1000-pcmcia: Added missing blank line.
Gulsah Kose [Sun, 22 Feb 2015 01:52:03 +0000 (03:52 +0200)]
staging: ft1000: ft1000-pcmcia: Added missing blank line.

Added missing blank line after declaration. Removed following checkpatch.pl warning:
WARNING: Missing a blank line after declarations

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ft1000: ft1000-pcmcia: Removed unnecessary parentheses.
Gulsah Kose [Sun, 22 Feb 2015 01:52:02 +0000 (03:52 +0200)]
staging: ft1000: ft1000-pcmcia: Removed unnecessary parentheses.

This patch removes unnecessary parentheses from control expression.
Removed following checkpatch.pl warning:
WARNING: Unnecessary parentheses

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ft1000: ft1000-pcmcia: Deleted unnecessary braces.
Gulsah Kose [Sun, 22 Feb 2015 01:52:01 +0000 (03:52 +0200)]
staging: ft1000: ft1000-pcmcia: Deleted unnecessary braces.

Brackets were removed from the expression that containing single
line in the phrase "if else". Removed following checkpatch.pl
warnings:
WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: ft1000: ft1000-pcmcia: Removed all useless "else"
Gulsah Kose [Sun, 22 Feb 2015 01:52:00 +0000 (03:52 +0200)]
staging: ft1000: ft1000-pcmcia: Removed all useless "else"

Removed all else keywords that used after break or return. Removed following checkpatch.pl warnings:
WARNING: else is not generally useful after a break or return

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: drivers: dma: Add space before (
Dilek Uzulmez [Sat, 21 Feb 2015 18:48:02 +0000 (20:48 +0200)]
Staging: drivers: dma: Add space before (

This patch fixes checkpatch.pl error in file ste_dma40.c
ERROR: space required before the open parenthesis '('

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192: Simplifying if-else statement
Ksenija Stanojevic [Fri, 20 Feb 2015 17:14:30 +0000 (18:14 +0100)]
Staging: rtl8192: Simplifying if-else statement

This patch simplifies the code by not having two identical paths and
fixes the warning given by checkpatch.pl: "else is not useful after
a break or return".

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192e: replace memcpy() by ether_addr_copy() using coccinelle and pack...
Melike Yurtoglu [Sun, 22 Feb 2015 14:58:08 +0000 (16:58 +0200)]
Staging: rtl8192e: replace memcpy() by ether_addr_copy() using coccinelle and pack variable

This patch focuses on fixing the following warning generated
by checkpatch.pl for the file rxtx.c

Prefer ether_addr_copy() over memcpy() if the Ethernet addresses
are __aligned(2)

@@ expression e1, e2; @@

- memcpy(e1, e2, ETH_ALEN);
+ ether_addr_copy(e1, e2);

struct net_device {
        char                       name[16];             /*     0    16*/
        struct hlist_node          name_hlist;           /*    16    16*/
        char *                     ifalias;              /*    32     8*/
        long unsigned int          mem_end;              /*    40     8*/
        long unsigned int          mem_start;            /*    48     8*/
        long unsigned int          base_addr;            /*    56     8*/
        /* --- cacheline 1 boundary (64 bytes) --- */
        int                        irq;                  /*    64     4*/

        /* XXX 4 bytes hole, try to pack */

        long unsigned int          state;                /*    72     8*/
        struct list_head           dev_list;             /*    80    16*/
        struct list_head           napi_list;            /*    96    16*/
        struct list_head           unreg_list;           /*   112    16*/
        /* --- cacheline 2 boundary (128 bytes) --- */
        struct list_head           close_list;           /*   128    16*/
        struct {
                struct list_head   upper;                /*   144    16*/
                struct list_head   lower;                /*   160    16*/
        } adj_list;                                      /*   144    32*/
        struct {
                struct list_head   upper;                /*   176    16*/
                struct list_head   lower;                /*   192    16*/
        } all_adj_list;                                  /*   176    32*/
        /* --- cacheline 3 boundary (192 bytes) was 16 bytes ago --- */
        netdev_features_t          features;             /*   208     8*/
        netdev_features_t          hw_features;          /*   216     8*/
        netdev_features_t          wanted_features;      /*   224     8*/
        netdev_features_t          vlan_features;        /*   232     8*/
        netdev_features_t          hw_enc_features;      /*   240     8*/
        netdev_features_t          mpls_features;        /*   248     8*/
        /* --- cacheline 4 boundary (256 bytes) --- */
int                        ifindex;              /*   256     4*/
        int                        iflink;               /*   260     4*/
        struct net_device_stats    stats;                /*   264   184*/
        /* --- cacheline 7 boundary (448 bytes) --- */
        atomic_long_t              rx_dropped;           /*   448     8*/
        atomic_long_t              tx_dropped;           /*   456     8*/
        atomic_t                   carrier_changes;      /*   464     4*/

        /* XXX 4 bytes hole, try to pack */

        const struct iw_handler_def  * wireless_handlers; /*   472     8*/
        struct iw_public_data *    wireless_data;        /*   480     8*/
        const struct net_device_ops  * netdev_ops;       /*   488     8*/
        const struct ethtool_ops  * ethtool_ops;         /*   496     8*/
        const struct forwarding_accel_ops  * fwd_ops;    /*   504     8*/
        /* --- cacheline 8 boundary (512 bytes) --- */
        const struct header_ops  * header_ops;           /*   512     8*/
        unsigned int               flags;                /*   520     4*/
        unsigned int               priv_flags;           /*   524     4*/
        short unsigned int         gflags;               /*   528     2*/
        short unsigned int         padded;               /*   530     2*/
        unsigned char              operstate;            /*   532     1*/
        unsigned char              link_mode;            /*   533     1*/
        unsigned char              if_port;              /*   534     1*/
        unsigned char              dma;                  /*   535     1*/
        unsigned int               mtu;                  /*   536     4*/
        short unsigned int         type;                 /*   540     2*/
        short unsigned int         hard_header_len;      /*   542     2*/
        short unsigned int         needed_headroom;      /*   544     2*/
        short unsigned int         needed_tailroom;      /*   546     2*/
        unsigned char              perm_addr[32];        /*   548    32*/
        /* --- cacheline 9 boundary (576 bytes) was 4 bytes ago --- */
        unsigned char              addr_assign_type;     /*   580     1*/
        unsigned char              addr_len;             /*   581     1*/
        short unsigned int         neigh_priv_len;       /*   582     2*/
        short unsigned int         dev_id;               /*   584     2*/
        short unsigned int         dev_port;             /*   586     2*/
        spinlock_t                 addr_list_lock;       /*   588     4*/
struct netdev_hw_addr_list uc;                   /*   592    24*/
        struct netdev_hw_addr_list mc;                   /*   616    24*/
        /* --- cacheline 10 boundary (640 bytes) --- */
        struct netdev_hw_addr_list dev_addrs;            /*   640    24*/
        struct kset *              queues_kset;          /*   664     8*/
        unsigned char              name_assign_type;     /*   672     1*/
        bool                       uc_promisc;           /*   673     1*/

        /* XXX 2 bytes hole, try to pack */

        unsigned int               promiscuity;          /*   676     4*/
        unsigned int               allmulti;             /*   680     4*/

        /* XXX 4 bytes hole, try to pack */

        struct vlan_info *         vlan_info;            /*   688     8*/
        struct dsa_switch_tree *   dsa_ptr;              /*   696     8*/
        /* --- cacheline 11 boundary (704 bytes) --- */
        struct tipc_bearer *       tipc_ptr;             /*   704     8*/
        void *                     atalk_ptr;            /*   712     8*/
        struct in_device *         ip_ptr;               /*   720     8*/
        struct dn_dev *            dn_ptr;               /*   728     8*/
        struct inet6_dev *         ip6_ptr;              /*   736     8*/
        void *                     ax25_ptr;             /*   744     8*/
        struct wireless_dev *      ieee80211_ptr;        /*   752     8*/
        struct wpan_dev *          ieee802154_ptr;       /*   760     8*/
        /* --- cacheline 12 boundary (768 bytes) --- */
        long unsigned int          last_rx;              /*   768     8*/
        unsigned char *            dev_addr;             /*   776     8*/
        struct netdev_rx_queue *   _rx;                  /*   784     8*/
        unsigned int               num_rx_queues;        /*   792     4*/
        unsigned int               real_num_rx_queues;   /*   796     4*/
        long unsigned int          gro_flush_timeout;    /*   800     8*/
        rx_handler_func_t *        rx_handler;           /*   808     8*/
        void *                     rx_handler_data;      /*   816     8*/
        struct netdev_queue *      ingress_queue;        /*   824     8*/
        /* --- cacheline 13 boundary (832 bytes) --- */
unsigned char              broadcast[32];        /*   832    32*/

        /* XXX 32 bytes hole, try to pack */

        /* --- cacheline 14 boundary (896 bytes) --- */
        struct netdev_queue *      _tx;                  /*   896     8*/
        unsigned int               num_tx_queues;        /*   904     4*/
        unsigned int               real_num_tx_queues;   /*   908     4*/
        struct Qdisc *             qdisc;                /*   912     8*/
        long unsigned int          tx_queue_len;         /*   920     8*/
        spinlock_t                 tx_global_lock;       /*   928     4*/

        /* XXX 4 bytes hole, try to pack */

        struct xps_dev_maps *      xps_maps;             /*   936     8*/
        struct cpu_rmap *          rx_cpu_rmap;          /*   944     8*/
        long unsigned int          trans_start;          /*   952     8*/
        /* --- cacheline 15 boundary (960 bytes) --- */
        int                        watchdog_timeo;       /*   960     4*/

        /* XXX 4 bytes hole, try to pack */

        struct timer_list          watchdog_timer;       /*   968    80*/
        /* --- cacheline 16 boundary (1024 bytes) was 24 bytes ago ---* */
        int *                      pcpu_refcnt;          /*  1048     8*/
        struct list_head           todo_list;            /*  1056    16*/
        struct hlist_node          index_hlist;          /*  1072    16*/
        /* --- cacheline 17 boundary (1088 bytes) --- */
        struct list_head           link_watch_list;      /*  1088    16*/
        enum {
                NETREG_UNINITIALIZED = 0,
                NETREG_REGISTERED = 1,
                NETREG_UNREGISTERING = 2,
                NETREG_UNREGISTERED = 3,
                NETREG_RELEASED = 4,
                NETREG_DUMMY = 5,
        } reg_state:8;                                     /*  1104 4 */
/* Bitfield combined with next fields */

        bool                       dismantle;            /*  1105     1*/

        /* Bitfield combined with previous fields */

        enum {
                RTNL_LINK_INITIALIZED = 0,
                RTNL_LINK_INITIALIZING = 1,
        } rtnl_link_state:16;                               /*  1104 4 */

        /* XXX 4 bytes hole, try to pack */

        void                       (*destructor)(struct net_device *);/*  1112     8 */
        struct netpoll_info *      npinfo;               /*  1120     8*/
        struct net *               nd_net;               /*  1128     8*/
        union {
                void *             ml_priv;              /*           8*/
                struct pcpu_lstats * lstats;             /*           8*/
                struct pcpu_sw_netstats * tstats;        /*           8*/
                struct pcpu_dstats * dstats;             /*           8*/
                struct pcpu_vstats * vstats;             /*           8*/
        };                                               /*  1136     8*/
        struct garp_port *         garp_port;            /*  1144     8*/
        /* --- cacheline 18 boundary (1152 bytes) was 4 bytes ago --- */
        struct mrp_port *          mrp_port;             /*  1152     8*/
        struct device              dev;                  /*  1160   696*/

        /* XXX last struct has 7 bytes of padding */

        /* --- cacheline 29 boundary (1856 bytes) was 4 bytes ago --- */
        const struct attribute_group  * sysfs_groups[4]; /*  1856    32*/
        const struct attribute_group  * sysfs_rx_queue_group; /*  18888 */
        const struct rtnl_link_ops  * rtnl_link_ops;     /*  1896     8*/
        unsigned int               gso_max_size;         /*  1904     4*/
        u16                        gso_max_segs;         /*  1908     2*/
        u16                        gso_min_segs;         /*  1910     2*/
const struct dcbnl_rtnl_ops  * dcbnl_ops;        /*  1912     8*/
        /* --- cacheline 30 boundary (1920 bytes) was 4 bytes ago --- */
        u8                         num_tc;               /*  1920     1*/

        /* XXX 1 byte hole, try to pack */

        struct netdev_tc_txq       tc_to_txq[16];        /*  1922    64*/
        /* --- cacheline 31 boundary (1984 bytes) was 6 bytes ago --- */
        u8                         prio_tc_map[16];      /*  1986    16*/

        /* XXX 2 bytes hole, try to pack */

        unsigned int               fcoe_ddp_xid;         /*  2004     4*/
        struct phy_device *        phydev;               /*  2008     8*/
        struct lock_class_key *    qdisc_tx_busylock;    /*  2016     8*/
        int                        group;                /*  2024     4*/

        /* XXX 4 bytes hole, try to pack */

        struct pm_qos_request      pm_qos_req;           /*  2032   176*/
        /* --- cacheline 34 boundary (2176 bytes) was 36 bytes ago --- * */

        /* size: 2240, cachelines: 35, members: 120 */
        /* sum members: 2147, holes: 11, sum holes: 65 */
        /* padding: 32 */
        /* paddings: 1, sum paddings: 7 */

        /* BRAIN FART ALERT! 2240 != 2147 + 65(holes), diff = 28 */

};

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8712: Use mod_timer
Vaishali Thakkar [Wed, 25 Feb 2015 04:05:32 +0000 (09:35 +0530)]
Staging: rtl8712: Use mod_timer

This patch introduces the use of API function mod_timer
instead of driver specific function as it is a more
efficient and standard way to update the expire field of
an active timer.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8712: Remove unused macros
Katie Dunne [Wed, 25 Feb 2015 15:40:37 +0000 (07:40 -0800)]
Staging: rtl8712: Remove unused macros

Removes several macro definitions that are unused
Patch 2 will remove the same definitions in rtl8188eu/include/wifi.h

Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8712: replace memcpy() by ether_addr_copy() using coccinelle and pack...
Melike Yurtoglu [Mon, 23 Feb 2015 07:11:57 +0000 (09:11 +0200)]
Staging: rtl8712: replace memcpy() by ether_addr_copy() using coccinelle and pack variable

This patch focuses on fixing the following warning generated
by checkpatch.pl for the file rtl871x_cmd.c

Prefer ether_addr_copy() over memcpy() if the Ethernet addresses
are __aligned(2)

@@ expression e1, e2; @@

- memcpy(e1, e2, ETH_ALEN);
+ ether_addr_copy(e1, e2);

struct _adapter {
        struct dvobj_priv          dvobjpriv;            /*     0    40*/
        struct mlme_priv           mlmepriv;             /*    40  1560*/
        /* --- cacheline 25 boundary (1600 bytes) --- */
        struct cmd_priv            cmdpriv;              /*  1600   136*/
        /* --- cacheline 27 boundary (1728 bytes) was 8 bytes ago --- */
        struct evt_priv            evtpriv;              /*  1736    96*/
        /* --- cacheline 28 boundary (1792 bytes) was 40 bytes ago --- * */
        struct io_queue *          pio_queue;            /*  1832     8*/
        struct xmit_priv           xmitpriv;             /*  1840   912*/
        /* --- cacheline 43 boundary (2752 bytes) --- */
        struct recv_priv           recvpriv;             /*  2752  1088*/
        /* --- cacheline 60 boundary (3840 bytes) --- */
        struct sta_priv            stapriv;              /*  3840   672*/
        /* --- cacheline 70 boundary (4480 bytes) was 32 bytes ago --- * */
        struct security_priv       securitypriv;         /*  4512  4816*/
        /* --- cacheline 145 boundary (9280 bytes) was 48 bytes ago --- * */
        struct registry_priv       registrypriv;         /*  9328   968*/
        /* --- cacheline 160 boundary (10240 bytes) was 56 bytes ago --- * */
        struct wlan_acl_pool       acl_list;             /* 10296  1536*/
        /* --- cacheline 184 boundary (11776 bytes) was 56 bytes ago --- * */
        struct pwrctrl_priv        pwrctrlpriv;          /* 11832   224*/
        /* --- cacheline 188 boundary (12032 bytes) was 24 bytes ago --- * */
        struct eeprom_priv         eeprompriv;           /* 12056   508*/

        /* XXX 4 bytes hole, try to pack */

        /* --- cacheline 196 boundary (12544 bytes) was 24 bytes ago --- * */
        struct hal_priv            halpriv;              /* 12568    88*/
        /* --- cacheline 197 boundary (12608 bytes) was 48 bytes ago --- * */
        struct led_priv            ledpriv;              /* 12656   304*/
        /* --- cacheline 202 boundary (12928 bytes) was 32 bytes ago --- * */
        struct mp_priv             mppriv;               /* 12960  1080*/
 /* --- cacheline 219 boundary (14016 bytes) was 24 bytes ago * --- */
        s32                        bDriverStopped;       /* 14040     4*/
        s32                        bSurpriseRemoved;     /* 14044     4*/
        u32                        IsrContent;           /* 14048     4*/
        u32                        ImrContent;           /* 14052     4*/
        u8                         EepromAddressSize;    /* 14056     1*/
        u8                         hw_init_completed;    /* 14057     1*/

        /* XXX 6 bytes hole, try to pack */

        struct task_struct *       cmdThread;            /* 14064     8*/
        pid_t                      evtThread;            /* 14072     4*/

        /* XXX 4 bytes hole, try to pack */

        /* --- cacheline 220 boundary (14080 bytes) --- */
        struct task_struct *       xmitThread;           /* 14080     8*/
        pid_t                      recvThread;           /* 14088     4*/

        /* XXX 4 bytes hole, try to pack */

        uint                       (*dvobj_init)(struct _adapter *); /*14096     8 */
        void                       (*dvobj_deinit)(struct _adapter *);/* 14104     8 */
        struct net_device *        pnetdev;              /* 14112     8*/
        int                        bup;                  /* 14120     4*/

        /* XXX 4 bytes hole, try to pack */

        struct net_device_stats    stats;                /* 14128   184*/
        /* --- cacheline 223 boundary (14272 bytes) was 40 bytes ago --- * */
 struct iw_statistics       iwstats;              /* 14312    32*/
        /* --- cacheline 224 boundary (14336 bytes) was 8 bytes ago --- * */
        int                        pid;                  /* 14344     4*/

        /* XXX 4 bytes hole, try to pack */

        struct work_struct         wkFilterRxFF0;        /* 14352    32*/
        u8                         blnEnableRxFF0Filter; /* 14384     1*/

        /* XXX 3 bytes hole, try to pack */

        spinlock_t                 lockRxFF0Filter;      /* 14388     4*/
        const struct firmware  *   fw;                   /* 14392     8*/
        /* --- cacheline 225 boundary (14400 bytes) --- */
        struct usb_interface *     pusb_intf;            /* 14400     8*/
        struct mutex               mutex_start;          /* 14408    40*/

        /* XXX last struct has 4 bytes of padding */

        struct completion          rtl8712_fw_ready;     /* 14448    32*/
        /* --- cacheline 226 boundary (14464 bytes) was 16 bytes ago --- * */

        /* size: 14480, cachelines: 227, members: 40 */
        /* sum members: 14451, holes: 7, sum holes: 29 */
        /* paddings: 1, sum paddings: 4 */
        /* last cacheline: 16 bytes */
};

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8712: replace memcpy() by ether_addr_copy() using coccinelle and pack...
Melike Yurtoglu [Mon, 23 Feb 2015 06:42:56 +0000 (08:42 +0200)]
Staging: rtl8712: replace memcpy() by ether_addr_copy() using coccinelle and pack variable

This patch focuses on fixing the following warning generated
by checkpatch.pl for the file rxtx.c

Prefer ether_addr_copy() over memcpy() if the Ethernet addresses
are __aligned(2)

@@ expression e1, e2; @@

- memcpy(e1, e2, ETH_ALEN);
+ ether_addr_copy(e1, e2);

struct _adapter {
        struct dvobj_priv          dvobjpriv;            /*     0    40*/
        struct mlme_priv           mlmepriv;             /*    40  1560*/
        /* --- cacheline 25 boundary (1600 bytes) --- */
        struct cmd_priv            cmdpriv;              /*  1600   136*/
        /* --- cacheline 27 boundary (1728 bytes) was 8 bytes ago --- */
        struct evt_priv            evtpriv;              /*  1736    96*/
        /* --- cacheline 28 boundary (1792 bytes) was 40 bytes ago --- * */
        struct io_queue *          pio_queue;            /*  1832     8*/
        struct xmit_priv           xmitpriv;             /*  1840   912*/
        /* --- cacheline 43 boundary (2752 bytes) --- */
        struct recv_priv           recvpriv;             /*  2752  1088*/
        /* --- cacheline 60 boundary (3840 bytes) --- */
        struct sta_priv            stapriv;              /*  3840   672*/
        /* --- cacheline 70 boundary (4480 bytes) was 32 bytes ago --- * */
        struct security_priv       securitypriv;         /*  4512  4816*/
        /* --- cacheline 145 boundary (9280 bytes) was 48 bytes ago --- * */
        struct registry_priv       registrypriv;         /*  9328   968*/
        /* --- cacheline 160 boundary (10240 bytes) was 56 bytes ago --- * */
        struct wlan_acl_pool       acl_list;             /* 10296  1536*/
        /* --- cacheline 184 boundary (11776 bytes) was 56 bytes ago --- * */
        struct pwrctrl_priv        pwrctrlpriv;          /* 11832   224*/
        /* --- cacheline 188 boundary (12032 bytes) was 24 bytes ago --- * */
        struct eeprom_priv         eeprompriv;           /* 12056   508*/

        /* XXX 4 bytes hole, try to pack */

        /* --- cacheline 196 boundary (12544 bytes) was 24 bytes ago --- * */
        struct hal_priv            halpriv;              /* 12568    88*/
        /* --- cacheline 197 boundary (12608 bytes) was 48 bytes ago --- * */
        struct led_priv            ledpriv;              /* 12656   304*/
        /* --- cacheline 202 boundary (12928 bytes) was 32 bytes ago --- * */
        struct mp_priv             mppriv;               /* 12960  1080*/
        /* --- cacheline 219 boundary (14016 bytes) was 24 bytes ago --- * */
        s32                        bDriverStopped;       /* 14040     4*/
        s32                        bSurpriseRemoved;     /* 14044     4*/
        u32                        IsrContent;           /* 14048     4*/
        u32                        ImrContent;           /* 14052     4*/
 u8                         EepromAddressSize;    /* 14056     1*/
        u8                         hw_init_completed;    /* 14057     1*/

        /* XXX 6 bytes hole, try to pack */

        struct task_struct *       cmdThread;            /* 14064     8*/
        pid_t                      evtThread;            /* 14072     4*/

        /* XXX 4 bytes hole, try to pack */

        /* --- cacheline 220 boundary (14080 bytes) --- */
        struct task_struct *       xmitThread;           /* 14080     8*/
        pid_t                      recvThread;           /* 14088     4*/

        /* XXX 4 bytes hole, try to pack */

        uint                       (*dvobj_init)(struct _adapter *); /*14096     8 */
        void                       (*dvobj_deinit)(struct _adapter *);/* 14104     8 */
        struct net_device *        pnetdev;              /* 14112     8*/
        int                        bup;                  /* 14120     4*/

        /* XXX 4 bytes hole, try to pack */

        struct net_device_stats    stats;                /* 14128   184*/
        /* --- cacheline 223 boundary (14272 bytes) was 40 bytes ago --- * */
        struct iw_statistics       iwstats;              /* 14312    32*/
        /* --- cacheline 224 boundary (14336 bytes) was 8 bytes ago --- * */
        int                        pid;                  /* 14344     4*/

        /* XXX 4 bytes hole, try to pack */

        struct work_struct         wkFilterRxFF0;        /* 14352    32*/
        u8                         blnEnableRxFF0Filter; /* 14384     1*/

        /* XXX 3 bytes hole, try to pack */

        spinlock_t                 lockRxFF0Filter;      /* 14388     4*/
        const struct firmware  *   fw;                   /* 14392     8*/
 u8                         EepromAddressSize;    /* 14056     1*/
        u8                         hw_init_completed;    /* 14057     1*/

        /* XXX 6 bytes hole, try to pack */

        struct task_struct *       cmdThread;            /* 14064     8*/
        pid_t                      evtThread;            /* 14072     4*/

        /* XXX 4 bytes hole, try to pack */

        /* --- cacheline 220 boundary (14080 bytes) --- */
        struct task_struct *       xmitThread;           /* 14080     8*/
        pid_t                      recvThread;           /* 14088     4*/

        /* XXX 4 bytes hole, try to pack */

        uint                       (*dvobj_init)(struct _adapter *); /*14096     8 */
        void                       (*dvobj_deinit)(struct _adapter *);/* 14104     8 */
        struct net_device *        pnetdev;              /* 14112     8*/
        int                        bup;                  /* 14120     4*/

        /* XXX 4 bytes hole, try to pack */

        struct net_device_stats    stats;                /* 14128   184*/
        /* --- cacheline 223 boundary (14272 bytes) was 40 bytes ago --- * */
        struct iw_statistics       iwstats;              /* 14312    32*/
        /* --- cacheline 224 boundary (14336 bytes) was 8 bytes ago --- * */
        int                        pid;                  /* 14344     4*/

        /* XXX 4 bytes hole, try to pack */

        struct work_struct         wkFilterRxFF0;        /* 14352    32*/
        u8                         blnEnableRxFF0Filter; /* 14384     1*/

        /* XXX 3 bytes hole, try to pack */

        spinlock_t                 lockRxFF0Filter;      /* 14388     4*/
        const struct firmware  *   fw;                   /* 14392     8*/
/* --- cacheline 225 boundary (14400 bytes) --- */
        struct usb_interface *     pusb_intf;            /* 14400     8*/
        struct mutex               mutex_start;          /* 14408    40*/

        /* XXX last struct has 4 bytes of padding */

        struct completion          rtl8712_fw_ready;     /* 14448    32*/
        /* --- cacheline 226 boundary (14464 bytes) was 16 bytes ago --- * */

        /* size: 14480, cachelines: 227, members: 40 */
        /* sum members: 14451, holes: 7, sum holes: 29 */
        /* paddings: 1, sum paddings: 4 */
        /* last cacheline: 16 bytes */
};

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaing: rtl8712: else after return or break warning
Gamze POLAT [Fri, 20 Feb 2015 20:42:17 +0000 (22:42 +0200)]
staing: rtl8712: else after return or break warning

This patch fixes checkpatch.pl warning.
WARNING: else is not generally useful after a break or return

Signed-off-by: Gamze POLAT <gamzepolat94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Simplify if condition
Ksenija Stanojevic [Tue, 24 Feb 2015 21:21:12 +0000 (22:21 +0100)]
Staging: rtl8192u: Simplify if condition

Remove unnecessary TRUE statement. Field bMediaConnect is of bool
type, so such change is correct.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Simplify if condition.
Ksenija Stanojevic [Tue, 24 Feb 2015 20:54:08 +0000 (21:54 +0100)]
Staging: rtl8192u: Simplify if condition.

Remove unnecessary TRUE statement. Fields bDynamicTxLowPower and
bDynamicTxHighPower are of bool type so such change is correct.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Convert comments from C99 to C89 style
Ksenija Stanojevic [Mon, 23 Feb 2015 19:15:48 +0000 (20:15 +0100)]
Staging: rtl8192u: Convert comments from C99 to C89 style

Kernel style for comments is C89 style. Issue found by checkpatch.pl.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: Remove unnecessary comment
Navya Sri Nizamkari [Sun, 22 Feb 2015 16:41:20 +0000 (22:11 +0530)]
staging: rtl8192u: Remove unnecessary comment

The <linux/config.h> header file is not used anymore,
so it is commented out in this file.This patch deletes
that unnecessary comment.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: Remove commented header.
Navya Sri Nizamkari [Sun, 22 Feb 2015 21:40:57 +0000 (03:10 +0530)]
staging: rtl8192u: Remove commented header.

This patch removes the commented header <linux/config.h>
as it is not used in modern linux systems.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: Remove commented header.
Navya Sri Nizamkari [Sun, 22 Feb 2015 21:41:34 +0000 (03:11 +0530)]
staging: rtl8192u: Remove commented header.

This patch removes the commented header <linux/config.h>
as it is not used in modern linux systems.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: Remove commented header.
Navya Sri Nizamkari [Sun, 22 Feb 2015 21:41:59 +0000 (03:11 +0530)]
staging: rtl8192u: Remove commented header.

This patch removes the commented header <linux/config.h>
as it is not used in modern linux systems.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: Remove commented header.
Navya Sri Nizamkari [Sun, 22 Feb 2015 21:42:52 +0000 (03:12 +0530)]
staging: rtl8192u: Remove commented header.

This patch removes the commented header <linux/config.h>
as it is not used in modern linux systems.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: Remove commented header.
Navya Sri Nizamkari [Sun, 22 Feb 2015 21:43:15 +0000 (03:13 +0530)]
staging: rtl8192u: Remove commented header.

This patch removes the commented header <linux/config.h>
as it is not used in modern linux systems.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Remove trailing whitespace.
Ksenija Stanojevic [Sun, 22 Feb 2015 16:22:51 +0000 (17:22 +0100)]
Staging: rtl8192u: Remove trailing whitespace.

This patch removes whitespace at the end of the line.
Issue found by checkpatch.pl.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Fix do not use // c99 comments.
Dilek Uzulmez [Sun, 22 Feb 2015 12:50:06 +0000 (14:50 +0200)]
Staging: rtl8192u: Fix do not use // c99 comments.

This patch fixes "do not use // C99 comments" errors in ieee80211_module.c

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Remove space before ','
Dilek Uzulmez [Sat, 21 Feb 2015 19:16:34 +0000 (21:16 +0200)]
Staging: rtl8192u: Remove space before ','

This patch fixes checkpatch.pl error in file r8190_rtl8256.h
ERROR: space prohibited before that ',' (ctx:WxW)

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Fix do not use // c99 comments.
Dilek Uzulmez [Sat, 21 Feb 2015 19:03:23 +0000 (21:03 +0200)]
Staging: rtl8192u: Fix do not use // c99 comments.

This patch fixes "do not use // C99 comments" errors in
r8190_rtl8256.h

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Replace printk() with pr_debug() and netdev_dbg().
Ksenija Stanojevic [Sat, 21 Feb 2015 11:24:38 +0000 (12:24 +0100)]
Staging: rtl8192u: Replace printk() with pr_debug() and netdev_dbg().

For dynamic debugging pr_debug() or netdev_dbg (if there is a ponter
to a device net structure) is preferred over printk(), which is the
raw way to print something. Issue found by checkpatch.pl.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Remove else after return
Ksenija Stanojevic [Fri, 20 Feb 2015 21:54:27 +0000 (22:54 +0100)]
Staging: rtl8192u: Remove else after return

This patch simplifies the code by removing else and fixes
the following checkpatch.pl warning: "else is not useful after
break or return".

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Replace header files
Ksenija Stanojevic [Fri, 20 Feb 2015 21:26:57 +0000 (22:26 +0100)]
Staging: rtl8192u: Replace header files

Files <asm/string.h> and <asm/errno.h> should not be included directly.
This patch fixes the following checkpatch.pl warnings:
Use #include <linux/errno.h> instead of <asm/errno.h>
Use #include <linux/string.h> instead of <asm/string.h>

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8192u: Remove space before tab
Ksenija Stanojevic [Thu, 19 Feb 2015 22:05:20 +0000 (23:05 +0100)]
Staging: rtl8192u: Remove space before tab

This patch fixes the checkpatch.pl warning:
WARNING: "please, no space before tabs"

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: dgnc: Removed trailing whitespace
Gamze POLAT [Thu, 19 Feb 2015 08:43:07 +0000 (10:43 +0200)]
Staging: dgnc: Removed trailing whitespace

Removed trailing whitespaces to improve code readability and remove
checkpatch warning.

Signed-off-by: Gamze POLAT <gamzepolat94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: slicloss: replace init_timer by setup_timer
Aya Mahfouz [Thu, 19 Feb 2015 06:00:56 +0000 (08:00 +0200)]
staging: slicloss: replace init_timer by setup_timer

This patch replaces init_timer and the 2 step initialization of function
and data by setup_timer to make the code more concise.

The issue was discovered using the following coccinelle script:

@@
expression ds, e1, e2;
@@

-init_timer (&ds);
+setup_timer (&ds, e1, e2);
...
(
-ds.function = e1;
...
-ds.data = e2;
|
-ds.data = e2;
...
-ds.function = e1;
)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8192u: ieee80211: replace init_timer by setup_timer
Aya Mahfouz [Thu, 19 Feb 2015 05:59:51 +0000 (07:59 +0200)]
staging: rtl8192u: ieee80211: replace init_timer by setup_timer

This patch replaces init_timer and the 2 step initialization of function
and data by setup_timer to make the code more concise.

The issue was discovered using the following coccinelle script:

@@
expression ds, e1, e2;
@@

-init_timer (&ds);
+setup_timer (&ds, e1, e2);
...
(
-ds.function = e1;
...
-ds.data = e2;
|
-ds.data = e2;
...
-ds.function = e1;
)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: panel: replace init_timer by setup_timer
Aya Mahfouz [Thu, 19 Feb 2015 05:58:29 +0000 (07:58 +0200)]
staging: panel: replace init_timer by setup_timer

This patch replaces init_timer and the 2 step initialization of function
and data by setup_timer to make the code more concise.

The issue was discovered using the following coccinelle script:

@@
expression ds, e1, e2;
@@

-init_timer (&ds);
+setup_timer (&ds, e1, e2);
...
(
-ds.function = e1;
...
-ds.data = e2;
|
-ds.data = e2;
...
-ds.function = e1;
)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: replace init_timer by setup_timer
Aya Mahfouz [Thu, 19 Feb 2015 05:57:25 +0000 (07:57 +0200)]
staging: dgnc: replace init_timer by setup_timer

This patch replaces init_timer and the 2 step initialization of function
and data by setup_timer to make the code more concise.

The issue was discovered using the following coccinelle script:

@@
expression ds, e1, e2;
@@

-init_timer (&ds);
+setup_timer (&ds, e1, e2);
...
(
-ds.function = e1;
...
-ds.data = e2;
|
-ds.data = e2;
...
-ds.function = e1;
)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wlan-ng: replace init_timer by setup_timer
Aya Mahfouz [Thu, 19 Feb 2015 05:55:43 +0000 (07:55 +0200)]
staging: wlan-ng: replace init_timer by setup_timer

This patch replaces init_timer and the 2 step initialization of function
and data by setup_timer to make the code more concise.

The issue was discovered using the following coccinelle script:

@@
expression ds, e1, e2;
@@

-init_timer (&ds);
+setup_timer (&ds, e1, e2);
...
(
-ds.function = e1;
...
-ds.data = e2;
|
-ds.data = e2;
...
-ds.function = e1;
)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: fbtft: removed trailing whitespace
Yeliz Taneroglu [Wed, 25 Feb 2015 23:04:47 +0000 (01:04 +0200)]
Staging: fbtft: removed trailing whitespace

The following patch fixes the checkpatch.pl warning:
Removed all trailing whitespace in fb_s6d1121.c

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: fbtft: Convert comment from C99 style to C89 style
Melike Yurtoglu [Thu, 19 Feb 2015 19:18:18 +0000 (21:18 +0200)]
Staging: fbtft: Convert comment from C99 style to C89 style

This patch fixes checkpatch.pl error
ERROR: do not use C99 // comments

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: fbtft: remove trailing whitespace
Melike Yurtoglu [Thu, 19 Feb 2015 18:56:48 +0000 (20:56 +0200)]
Staging: fbtft: remove trailing whitespace

This patch fixes checkpatch.pl error trailing whitespace.

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: fbtft: Added blank line after declaration
aybuke ozdemir [Thu, 19 Feb 2015 18:42:43 +0000 (20:42 +0200)]
Staging: fbtft: Added blank line after declaration

WARNING: Missing a blank line after declaration
chackpatch.pl warning in fb_ssd1351.c

Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: fbtft: Added blank line after declaration
aybuke ozdemir [Thu, 19 Feb 2015 17:50:50 +0000 (19:50 +0200)]
Staging: fbtft: Added blank line after declaration

WARNING: Missing a blank line after declaration
chackpatch.pl warning in fb_ili9320.c

Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fix spacing errors
Aya Mahfouz [Thu, 19 Feb 2015 03:02:24 +0000 (05:02 +0200)]
staging: fbtft: fix spacing errors

This patch fixes the following checkpatch.pl errors:
space prohibited before that ','
space required after that ','
spaces required around that '='

Given that the addition of spaces triggered the line over 80 characters
warning, some lines were divided into two.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fix space prohibited before that ','
Aya Mahfouz [Thu, 19 Feb 2015 02:56:50 +0000 (04:56 +0200)]
staging: fbtft: fix space prohibited before that ','

This patch fixes the following checkpatch.pl error:
fix space prohibited before that ','

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fix space required after that ','
Aya Mahfouz [Thu, 19 Feb 2015 02:55:45 +0000 (04:55 +0200)]
staging: fbtft: fix space required after that ','

This patch fixes the following checkpatch.pl error:
space required after that ','

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fix braces {} are not necessary for single statement blocks
Aya Mahfouz [Thu, 19 Feb 2015 02:50:25 +0000 (04:50 +0200)]
staging: fbtft: fix braces {} are not necessary for single statement blocks

This patch fixes the following checkpatch.pl warning:
braces {} are not necessary for single statement blocks

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fix space prohibited before that ','
Aya Mahfouz [Thu, 19 Feb 2015 02:48:34 +0000 (04:48 +0200)]
staging: fbtft: fix space prohibited before that ','

This patch fixes the following checkpatch.pl error:
space prohibited before that ','

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fix braces {} are not necessary for single statement blocks
Aya Mahfouz [Thu, 19 Feb 2015 02:53:59 +0000 (04:53 +0200)]
staging: fbtft: fix braces {} are not necessary for single statement blocks

This patch fixes the following checkpatch.pl warning:
braces {} are not necessary for single statement blocks

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: fbtft: fix code indent should use tabs where possible
Aya Mahfouz [Thu, 19 Feb 2015 02:45:22 +0000 (04:45 +0200)]
staging: fbtft: fix code indent should use tabs where possible

This patch fixes the following checkpatch.pl error:
code indent should use tabs where possible

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8723au: Add blank line after declarations
Melike Yurtoglu [Thu, 26 Feb 2015 07:52:08 +0000 (09:52 +0200)]
Staging: rtl8723au: Add blank line after declarations

WARNING: "Missing a blank line after declarations"
Add blank line after declarations. That was found by running checkpatch

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8723au: Remove return in void function
Melike Yurtoglu [Thu, 26 Feb 2015 07:52:07 +0000 (09:52 +0200)]
Staging: rtl8723au: Remove return in void function

WARNING: void function return statements are not generally useful
Remove return in void function. That was found by running checkpatch.

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8723au: Tabs should be used
Melike Yurtoglu [Thu, 26 Feb 2015 06:51:03 +0000 (08:51 +0200)]
Staging: rtl8723au: Tabs should be used

WARNING: please, no spaces at the start of a line
That was found by running checkpatch.

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8723au: remove unnecessary break after return
Melike Yurtoglu [Wed, 25 Feb 2015 22:08:21 +0000 (00:08 +0200)]
Staging: rtl8723au: remove unnecessary break after return

WARNING: break is not useful after a goto or return.
Remove unnecessary break after return. That was found by running checkpatch.

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8723au: Remove return in void function
Melike Yurtoglu [Wed, 25 Feb 2015 21:26:21 +0000 (23:26 +0200)]
Staging: rtl8723au: Remove return in void function

WARNING: void function return statements are not generally useful
Remove return in void function. That was found by running checkpatch.

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8723au: Add blank line after declarations
Dilek Uzulmez [Tue, 24 Feb 2015 13:14:26 +0000 (15:14 +0200)]
Staging: rtl8723au: Add blank line after declarations

The following patch fixes the checkpatch.pl warning:
drivers/staging/rtl8723au/core/rtw_ap.c WARNING: Missing a blank
line after declarations

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8723au: core: Fix quoted string split across lines
Dilek Uzulmez [Sat, 21 Feb 2015 22:12:35 +0000 (00:12 +0200)]
Staging: rtl8723au: core: Fix quoted string split across lines

This patch fixes "quoted string split across lines warning" warning in
rtw_ap.c

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8723au: Use put_unaligned_le16
Vaishali Thakkar [Fri, 20 Feb 2015 08:48:45 +0000 (14:18 +0530)]
Staging: rtl8723au: Use put_unaligned_le16

Using byte ordering functions and then memcpy() is risky and
prone to hide errors which are hard to track down. So, this
patch introduces the use of function put_unaligned_le16 which
makes the code clear. Here, use of variable tim_bitmap_le
and variable itself is removed. Also, to be compatible with the
changes header file is added too.

Coccinelle is used to do this change and semantic patch used for
this is as follows:

@a@
typedef __le16;
__le16 e16;
identifier tmp;
expression ptr;
expression y,e;
type T;
@@

- tmp = cpu_to_le16(y);

<+... when != tmp
(
- memcpy(ptr, (T)&tmp, \(2\|sizeof(__le16)\|sizeof(e16)\));
+ put_unaligned_le16(y,ptr);
|
- memcpy(ptr, (T)&tmp, ...);
+ put_unaligned_le16(y,ptr);
)
...+>
? tmp = e

@@ type T; identifier a.tmp; @@

- T tmp;
...when != tmp

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rts5208: Remove braces around single if-statement
Haneen Mohammed [Tue, 17 Feb 2015 21:21:25 +0000 (00:21 +0300)]
Staging: rts5208: Remove braces around single if-statement

This patch removes unneeded braces around a single if-statement.
This problem was found using checkpatch.pl.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: Replace if-else block with switch-case
Vatika Harlalka [Thu, 26 Feb 2015 12:44:02 +0000 (18:14 +0530)]
Staging: rtl8188eu: Replace if-else block with switch-case

Replace if-else block with switch-case to make it more compact
and increase readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: Refactor conditional code to increase readability
Vatika Harlalka [Thu, 26 Feb 2015 17:35:11 +0000 (23:05 +0530)]
Staging: rtl8188eu: Refactor conditional code to increase readability

Remove the nested conditionals. The if and else-if have the same
code so they are combined to make the code more compact.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: Combine two loops to increase readability
Vatika Harlalka [Thu, 26 Feb 2015 18:17:39 +0000 (23:47 +0530)]
Staging: rtl8188eu: Combine two loops to increase readability

The first loop assigns values to ofdm_index array and the
second checks for boundary conditions. They are combined and
a comment is added to increase clarity.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: Remove unnecessary if condition
Vatika Harlalka [Thu, 26 Feb 2015 20:09:32 +0000 (01:39 +0530)]
Staging: rtl8188eu: Remove unnecessary if condition

Remove this branch as is2t is defined false and is not
modified. The variable value32 is then unused.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: Remove unused macros
Katie Dunne [Wed, 25 Feb 2015 15:41:14 +0000 (07:41 -0800)]
Staging: rtl8188eu: Remove unused macros

Removes macro definitions that are unused elsewhere

Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: Remove unnecessary variable
Vatika Harlalka [Mon, 23 Feb 2015 09:16:13 +0000 (14:46 +0530)]
Staging: rtl8188eu: Remove unnecessary variable

Remove unnecessary variable and replace its uses with previously
defined variable.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: Refactored code to increase readility
Vatika Harlalka [Mon, 23 Feb 2015 18:10:27 +0000 (23:40 +0530)]
Staging: rtl8188eu: Refactored code to increase readility

Refactored the conditional code to make it more compact.
Replaced the ternary operators with abs() macro to increase readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: Replace ternary operator with existing macro
Vatika Harlalka [Mon, 23 Feb 2015 18:36:14 +0000 (00:06 +0530)]
Staging: rtl8188eu: Replace ternary operator with existing macro

Replace ternary operator with existing abs() macro to increase
code readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: Remove redundant if condition
Vatika Harlalka [Thu, 26 Feb 2015 13:01:52 +0000 (18:31 +0530)]
Staging: rtl8188eu: Remove redundant if condition

Remove redundant if condition as !result is always false.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: Add blank line after declarations
Melike Yurtoglu [Mon, 23 Feb 2015 22:32:44 +0000 (00:32 +0200)]
Staging: rtl8188eu: Add blank line after declarations

WARNING: "Missing a blank line after declarations"
That was found by running checkpatch

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: Changed array and loop construct
Vatika Harlalka [Mon, 23 Feb 2015 14:02:38 +0000 (19:32 +0530)]
Staging: rtl8188eu: Changed array and loop construct

This function only required the array from the 14th element
onwards. Therefore, the array size is reduced and the loop
counter is modified so as to start from 0.
Also, the assignment of variable place is redundant as it is
initialized again in the loop.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: Replace unneeded switch-case block
Vatika Harlalka [Mon, 23 Feb 2015 09:11:07 +0000 (14:41 +0530)]
Staging: rtl8188eu: Replace unneeded switch-case block

Replace switch-case block with single if statement to
increase code readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: Remove unnecessary variable
Vatika Harlalka [Mon, 23 Feb 2015 08:50:30 +0000 (14:20 +0530)]
Staging: rtl8188eu: Remove unnecessary variable

Remove unneccessary variable and replace its uses with another
variable which is previously defined.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8188eu: Fix line over 80 characters
Vatika Harlalka [Sun, 22 Feb 2015 12:37:33 +0000 (18:07 +0530)]
Staging: rtl8188eu: Fix line over 80 characters

Added a variable to reduce line size and enhance code readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>