Commit Graph

885 Commits

Author SHA1 Message Date
anuvazhayil
a58af1e1ce Staging: rtl8723au: rtw_cmd: Replace foo*bar to foo *bar
Fixed the checkpatch.pl ERROR: "foo*bar" should be "foo *bar"

Signed-off-by: anuvazhayil <anuv.1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:20:55 -07:00
anuvazhayil
ed09b447dd Staging: rtl8723au: rtw_cmd: Fix space prohibited between function name and open parenthesis
Fixed the checkpatch.pl  WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: anuvazhayil <anuv.1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 15:39:55 +08:00
Roberta Dobrescu
85b4260ddf staging: rtl8723au: Remove duplicated argument to ||
This patch removes duplicated argument to ||, fixing the
following warning detected using coccinelle tool:
duplicated argument to && or ||.

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 18:47:22 +08:00
Roberta Dobrescu
038b70395a staging: rtl8723au: core: Remove uneeded return variable
This patch removes uneeded return variables, using only
'return _SUCCESS' instead.
It fixes the following warning detected by coccinelle:
Unneeded variable.

It was done using the following semantic patch:

@@
identifier ret;
type T;
expression e;
@@

-T ret = e;
 ... when != ret
     when strict
-return ret;
+return e;

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 18:47:22 +08:00
Roberta Dobrescu
35a0072771 staging: rtl8723au: os_dep: Remove uneeded return variable
This patch removes uneeded return variables, using only
'return _SUCCESS' instead.
It fixes the following warning detected by coccinelle:
Unneeded variable.

It was done using the following semantic patch:

@@
identifier ret;
type T;
expression e;
@@

-T ret = e;
 ... when != ret
     when strict
-return ret;
+return e;

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 18:45:03 +08:00
Roberta Dobrescu
147e45d921 staging: rtl8723au: hal: Remove uneeded return variable
This patch removes uneeded return variables, just using
'return _SUCCESS' or 'return HCI_STATUS_SUCCESS' instead.
This fixes the following warning detected using coccinelle:
Unneeded variable.

It was done using the following semantic patch:

@@
identifier ret;
type T;
expression e;
@@

-T ret = e;
 ... when != ret
     when strict
-return ret;
+return e;

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 18:45:03 +08:00
Roberta Dobrescu
b9b4224b13 staging: rtl8723au: Remove uneeded semicolon
This patch fixes the following warning detected using coccinelle:
Unneeded semicolon.

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 18:45:03 +08:00
Roberta Dobrescu
08551cbb17 staging: rtl8723au: Do not use comparisons on bool tests
This patch removes unnecessary comparisons to bool.
It fixes the following warning detected using coccinelle tool:
WARNING: Comparison to bool.

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 18:45:03 +08:00
Tina Ruchandani
de1de2f68b Staging: rtl8723au: core: Add braces around macro
This patch fixes the following checkpatch warning:
ERROR: Macros with complex values should be enclosed
in parentheses
1535: FILE: drivers/staging/rtl8723au/core/rtw_mlme.c:1535:

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 18:43:36 +08:00
Jiayi Ye
8a0aa750c1 staging: rtl8723au: delete successive assignments to the same location
Successive assignments to the same location is meaningless and can be
deleted. The Coccinelle semantic patch was used to find cases.

@@
expression e1,e2,e3;
@@

(
 (<+...e1++...+>)=e2;
|
 (<+...e1--...+>)=e2;
|
 (<+...++e1...+>)=e2;
|
 (<+...--e1...+>)=e2;
|
e1=e2;
e1 = <+...e1...+>;
|
*e1=e2;
*e1=e3;
)

Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 18:42:37 +08:00
Vaishali Thakkar
94d2fc6361 Staging: rtl8723au: Use USB API functions
This patch replaces driver specific functions(RT_usb_endpoint_is_bulk_in,
RT_usb_endpoint_is_bulk_out, RT_usb_endpoint_is_int_in) with USB API
functions(usb_endpoint_is_bulk_in, usb_endpoint_is_bulk_out,
usb_endpoint_is_int_in).

Also, this patch removes these three RT functions as they are no longer
needed after replacement.

This patch also have one line over 80 characters as limiting it to 80
characters does not make code look good.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 18:42:36 +08:00
Jiayi Ye
1d06bb4e9d staging: remove unneeded parentheses around the right hand side of an assignment
In assignments such as value = (FLASH_CMD_STATUS_REG_READ << 24);, parentheses
are not needed. The Coccinelle semantic patch was used to find cases.

@r@
identifier x;
expression e1, e2;
@@

- x = (e1 << e2);
+ x = e1 << e2;

Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:06 +08:00
Tina Ruchandani
3e3f878f4d Staging: rtl8723au: core: Fix switch-case indent
This patch fixes the following checkpatch errors
in rtw_cmd.c :
ERROR: switch and case should be at the same indent

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:06 +08:00
Tina Ruchandani
5db8bee627 Staging: rtl8723au: core: Dont have { on new line
This patch fixes the following checkpatch errors:
ERROR: that open brace { should be on the previous line
ERROR: else should follow close brace '}'

Exceptions: { is left on a new line to itself when fixing
this error makes the line longer than 80 characters.

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:06 +08:00
Tina Ruchandani
f237216ebf Staging: rtl8723au: core: Dont have { on new line
This patch fixes the following checkpatch errors:
ERROR: that open brace { should be on the previous line
ERROR: else should follow close brace '}'

Exceptions: { is left on a new line to itself when fixing
this error makes the line longer than 80 characters.

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:06 +08:00
Tapasweni Pathak
029bf13814 staging: rtl8723au: Remove unnecessary else if
Removed the unnecessary else if condition as it has only
one comment inside it and do not have an FIXME or TODO comment near to
it too.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23 13:43:46 +08:00
Jes Sorensen
ab3136cc87 staging: rtl8723au: Remove a stack of write only counters
We don't do anything with these, so get rid of them

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:15 +08:00
Jes Sorensen
eb18cf6b23 staging: rtl8723au: Eliminate write-only struct wlan_network->aid
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:14 +08:00
Jes Sorensen
218189b7dc staging: rtl8723au: Remove unused struct ndis_802_11_key
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:14 +08:00
Jes Sorensen
60b152ced8 staging: rtl8723au: Fold struct wlan_phy_info into struct wlan_bssid_ex
Half the entries of struct wlan_phy_info weren't used and this makes
the code a little cleaner

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:14 +08:00
Jes Sorensen
f8cfb86e89 staging: rtl8723au: Remove unused struct zero_bulkout_content
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:14 +08:00
Jes Sorensen
f7d6e7c770 staging: rtl8723au: Re-organize struct xmit_priv for better packing
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:14 +08:00
Jes Sorensen
516f29e1c8 staging: rtl8723au: Don't read REQ_NQOS_SEQ 16 bits and write back 8 bits
This fixes a potential endian bug

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:14 +08:00
Jes Sorensen
b195011740 staging: rtl8723au: Use register define REQ_NQOS_SEQ instead of hardcoded value
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:14 +08:00
Jes Sorensen
70b88f5b36 staging: rtl8723au: Eliminate write-once variable xmit_priv->vcs_setting
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:14 +08:00
Jes Sorensen
0ceb7b15e8 staging: rtl8723au: Use enum values for vcs_type
Be consistent in the use of enum VCS_TYPE

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:14 +08:00
Jes Sorensen
0f20070483 staging: rtl8723au: Remove write-only struct xmit_priv->vcs_type
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:14 +08:00
Jes Sorensen
30e89958bc staging: rtl8723au: Fix alignment of mac_addr for ether_addr_copy() usage
Make sure struct eeprom_priv->mac_addr is 2 byte aligned to work with
ether_addr_copy()

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:13 +08:00
Yeliz Taneroglu
2c7c63a305 staging: rtl8723au: core: rtw_ap: Fix void function return statements style warning.
The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_ap.c WARNING: void function return statements are not generally useful

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:12 +08:00
Yeliz Taneroglu
22d59f4eb1 staging: rtl8723au: core: rtw_security: Fix void function return statements style warning.
The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_security.c WARNING: void function return statements are not generally useful

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:12 +08:00
Yeliz Taneroglu
a2d50bc892 staging: rtl8723au: core: rtw_wlan_util: Fix void function return statements style warning.
The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_wlan_util.c WARNING: void function return statements are not generally useful

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:12 +08:00
Yeliz Taneroglu
6ff432714e staging: rtl8723au: core: rtw_pwrctrl: Fix void function return statements style warning.
The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_pwrctrl.c WARNING: void function return statements are not generally useful

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:12 +08:00
Yeliz Taneroglu
9dfb753b2d staging: rtl8723au: core: rtw_mlme: fix void function return statements
The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_mlme.c WARNING: void function return statements are not generally useful

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:12 +08:00
Yeliz Taneroglu
b857641351 staging: rtl8723au: core: rtw_xmit: Add blank line after declarations
The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_xmit.c WARNING: Missing a blank line after declarations

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:28 +08:00
Yeliz Taneroglu
831fa5f6f6 staging: rtl8723au: core: rtw_recv: Add blank line after declarations
The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_recv.c WARNING: Missing a blank line after declarations

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:28 +08:00
Yeliz Taneroglu
547f975e60 staging: rtl8723au: core: rtw_wlan_util: Add blank line after declarations
The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_wlan_util.c WARNING: Missing a blank line after declarations

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:28 +08:00
Yeliz Taneroglu
d2db1cff21 staging: rtl8723au: core: rtw_pwrctrl: Add blank line after declarations
The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_pwrctrl.c WARNING: Missing a blank line after declarations

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:28 +08:00
Yeliz Taneroglu
2ce71bda7b staging: rtl8723au: core: rtw_mlme_ext: Add blank line after declarations
The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_mlme_ext.c WARNING: Missing a blank line after declarations

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:28 +08:00
Yeliz Taneroglu
29ed932fb2 staging: rtl8723au: core: rtw_mlme: Add blank line after declarations
The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_mlme.c WARNING: Missing a blank line after declarations

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:28 +08:00
Yeliz Taneroglu
96d92eb716 staging: rtl8723au: core: rtw_led: Add blank line after declarations
The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_led.c WARNING: Missing a blank line after declarations

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:28 +08:00
Yeliz Taneroglu
99ea15d659 staging: rtl8723au: core: rtw_ieee80211: Add blank line after declarations
The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_ieee80211.c  Warning: Missing a blank line after declarations

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:27 +08:00
Yeliz Taneroglu
fbc6d797e9 staging: rtl8723au: core: rtw_cmd: 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: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:27 +08:00
Greg Donald
8ce6b2d2b7 drivers: staging: rtl8723au: Fix "open brace '{' following struct go on the same line" errors
Fix checkpatch.pl "open brace '{' following struct go on the same line" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:27 +08:00
Greg Donald
8e3d161acc drivers: staging: rtl8723au: core: Fix "'foo * bar' should be 'foo *bar'" errors
Fix checkpatch.pl "'foo * bar' should be 'foo *bar'" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:26 +08:00
Tapasweni Pathak
4ecdc381d7 staging: rtl8723au: core: Replace open coded version with existing hweight function
This patch replaces the open coded version with Linux's existing hweight
functions.
The original version checked each of the low four bits, accumulating and
returning the result. Instead, use a mask to select those four bits, and
pass the result to hweight8.
It also makes the code in this function simpler.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:17 +08:00
Mahati Chamarthy
2430454e92 Staging: rtl8723au: include: Remove unused macros
This patch removes macros that are never used.

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:17 +08:00
Heena Sirwani
f9800f82b6 Staging: rtl8723au: core: Removed variable that is always 0.
The following patch removes a variable that is always 0 using
coccinelle.
The following semantic patch was used:

@@
identifier ret;
@@

-int ret = 0;
 ... when != ret
     when strict
-return ret;
+return 0;

Signed-off-by: Heena Sirwani <heenasirwani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:11 +08:00
Heena Sirwani
911f2921c4 Staging: rtl8723au: os_dep: Removed variable that is always 0.
The following patch removes a variable that is always 0 using
coccinelle.
The semaintic patch used is as follows:

@@
identifier ret;
@@

-int ret = 0;
 ... when != ret
     when strict
-return ret;
+return 0;

Signed-off-by: Heena Sirwani <heenasirwani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:11 +08:00
Mahati Chamarthy
15c389c14c Staging: rtl8723au: include: Remove unnecessary macro
This patch removes a macro which is not used anywhere except in the header
file. Existing usage in the header file is replaced with the actual value.

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:11 +08:00
Melike Yurtoglu
a724e4e3b2 staging: rtl8723au: include: fix space prohibited before
Fix checkpatch.pl issues with space prohibited before semicolon in
Hal8723UHWImg_CE.h

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:11 +08:00