Age | Commit message (Collapse) | Author | Files | Lines |
|
This patch fixes checkpatch.pl warning.
WARNING: else is not generally useful after a break or return
Signed-off-by: Dogukan Ergun <dogukan.ergun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Use kernel.h macro definition.
Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Fix reported by coccinelle compressing last two lines with single return
call
Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Fixed indentation issue in few lines
Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The loadparam() function cannot fail, it's called only once and its return
value is ignored there.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <greg@kroah.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <greg@kroah.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
"step 2" does mean much as there is no "step 1" stated anywhere...
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <greg@kroah.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
With an RTL8191SU USB adaptor, sometimes the hints for a fragmented
packet are set, but the packet length is too large. Allocate enough
space to prevent memory corruption and a resulting kernel panic [1].
[1] http://www.spinics.net/lists/linux-wireless/msg136546.html
Cc: <stable@vger.kernel.org>
Signed-off-by: Haggai Eran <haggai.eran@gmail.com>
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
del_timer_sync() is not to be called in the interrupt context unless
the timer is irqsafe. but most of the functions where commits
6501c8e7d86cca5f and 382d020f4459cd77 touched were called in interrupt
context. And as a result the WARN_ON was getting triggered. Changed
to del_timer() in places which were called from interrupt.
Fixes: 382d020f4459cd77 ("Staging: rtl8712: Eliminate use of _cancel_timer"
Fixes: 6501c8e7d86cca5f ("Staging: rtl8712: Eliminate use of _cancel_timer_ex")
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=97711
Reported-by: Arek Rusniak <arek.rusi@gmail.com>
Tested-by: Arek Rusniak <arek.rusi@gmail.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Fixes Warning encounter this by applying checkpatch.pl against this file:
Prefer ether_addr_copy() over memcpy() if the Ethernet addresses
are __aligned(2)
pahole output for respective structures:
- addr->sa_data
struct sockaddr {
sa_family_t sa_family; /* 0 2 */
char sa_data[14]; /* 2 14 */
/* size: 16, cachelines: 1, members: 2 */
/* last cacheline: 16 bytes */
};
- pnetdev->dev_addr
dev_addr is interface address infor from generic net_device structure
which is properly aligned and have some patches with this change as well.
"staging: rtl8712: fix Prefer ether_addr_copy() over memcpy()"
(sha1: 36e4d8826b317080e283e4edd08bf8d5ac706f38)
Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
We want the fixes in here for testing and merge issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
These are all defined as a part of the standard and should not be
duplicated on a per-driver basis. Use the global ones and delete the
local ones.
It seems that ieee80211 was already included everywhere it was needed,
since no explicit include <...> were needed to be added in order to
preserve getting a successful compile.
This isn't the totality of duplicated data removed, but it is a start.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Fixed multiple spelling errors.
Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
If memdup_user() fails then "pparmbuf" is an error pointer and we can't
pass it to kfree(). I changed the "goto _r871x_mp_ioctl_hdl_exit" to a
direct return.
I changed the earlier goto to a direct return as well for consistency
and removed the "pparmbuf = NULL" initializer since it's no longer
needed.
Fixes: 45de432775d6 ('Staging: rtl8712: Use memdup_user() instead of copy_from_user()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The result of netdev_priv is already implicitly cast to the type of the
left side of the assignment.
The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
type T;
T *x;
@@
x =
- (T *)
netdev_priv(...)
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Removes variable comparison with 0 by using !. Done using following
coccinelle script.
@ disable is_zero,isnt_zero @
expression *E;
expression E1,f;
@@
E = f(...)
<...
(
- E == 0
+ !E
|
- E != 0
+ E
|
- 0 == E
+ !E
|
- 0 != E
+ E
)
...>
?E = E1
@ disable is_zero,isnt_zero @
expression *E;
@@
(
E ==
- 0
+ NULL
|
E !=
- 0
+ NULL
|
- 0
+ NULL
== E
|
- 0
+ NULL
!= E
)
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Delete duplicated argument to | for the state argument in
the _clr_fwstate_() function call as it is redundant.
Detected with coccinelle.
Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Use memdup_user() to avoid its duplicated implementation and simplify
code. memdup_user() uses GFP_KERNEL instead of GFP_ATOMIC,
which is valid because copy_from_user() might sleep and it's useless
to make the allocation atomic. Found with coccinelle.
Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This patch replace memcpy with ethe_addr_copy to address the following
warning generated by checkpatch.pl: ""Prefer ether_addr_copy over memcpy
if the Ethernet addresses are __aligned(2)"
Follwoing is the output of pahole for the relevant datastructures:
1- for "iwe.u.ap_addr.sa_data" and "wrqu->ap_addr.sa_data"
struct sockaddr {
sa_family_t sa_family; /* 0 2 */
char sa_data[14]; /* 2 14 */
/* size: 16, cachelines: 1, members: 2 */
/* last cacheline: 16 bytes */
};
struct iw_event {
__u16 len; /* 0 2 */
__u16 cmd; /* 2 2 */
/* XXX 4 bytes hole, try to pack */
union iwreq_data u; /* 8 16 */
/* size: 24, cachelines: 1, members: 3 */
/* sum members: 20, holes: 1, sum holes: 4 */
/* last cacheline: 24 bytes */
};
2- for "pnetwork->network.MacAddress" and "pcur_bss->MacAddress"
struct wlan_network {
struct list_head list; /* 0 16 */
int network_type; /* 16 4 */
int fixed; /* 20 4 */
unsigned int last_scanned; /* 24 4 */
int aid; /* 28 4 */
int join_res; /* 32 4 */
struct ndis_wlan_bssid_ex network; /* 36 884 */
/* --- cacheline 14 boundary (896 bytes) was 24 bytes ago --- */
/* size: 920, cachelines: 15, members: 7 */
/* last cacheline: 24 bytes */
};
struct ndis_wlan_bssid_ex {
u32 Length; /* 0 4 */
unsigned char MacAddress[6]; /* 4 6 */
u8 Reserved[2]; /* 10 2 */
struct ndis_802_11_ssid Ssid; /* 12 36 */
u32 Privacy; /* 48 4 */
s32 Rssi; /* 52 4 */
enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse; /* 56 4 */
struct NDIS_802_11_CONFIGURATION Configuration; /* 60 32 */
/* --- cacheline 1 boundary (64 bytes) was 28 bytes ago --- */
enum NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode; /* 92 4 */
NDIS_802_11_RATES_EX SupportedRates; /* 96 16 */
u32 IELength; /* 112 4 */
u8 IEs[768]; /* 116 768 */
/* --- cacheline 13 boundary (832 bytes) was 52 bytes ago --- */
/* size: 884, cachelines: 14, members: 12 */
/* last cacheline: 52 bytes */
};
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This fixes the following checkpatch.pl warning:
WARNING: __constant_cpu_to_le16 should be cpu_to_le16
Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Check if kmalloc succeded before using the pointer in memcpy.
Signed-off-by: Matteo Semenzato <mattew8898@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
else after return generally is not useful. This patch removes else after return
statement. Issue addressed by checkpatch.pl.
Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Use timer API function del_timer_sync instead of driver
specific function _cancel_timer as besides deactivating
a timer, it also ensures that the timer is stopped on all
CPUs before the driver exists. Also, variables
timer_cancelled and bool are removed as they are no longer
needed.
@a@
expression x;
identifier y;
@@
- _cancel_timer (&x, &y);
+ del_timer_sync (&x);
@@type T; identifier a.y;@@
- T y;
...when != y
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Use timer API function del_timer_sync instead of driver
specific function _cancel_timer_ex as besides deactivating
a timer, it ensures that the timer is stopped on all
CPUs before the driver exists. Also, definition of function
_cancel_timer_ex is removed as it is no longer needed after
this change.
This is done using Coccinelle and semantic patch used for
this is as follows:
@@ expression x; @@
- _cancel_timer_ex (&x);
+ del_timer_sync (&x);
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Using addressof and then casting to the original type is unneeded.
So these casts can be removed.
Issue detected via Coccinelle script.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Parentheses around the right side of an assignment statement are
unnecessary and hence removed. Coccinelle was used to produce the
patch:
@rule1@
identifier x,y;
constant c;
@@
(
x =
-(
y << c
-)
;
|
x =
-(
y >> c
-)
;
|
x =
-(
y + c
-)
;
|
x =
-(
y - c
-)
;
)
Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
eth_zero_addr() is a wrapper function for memset if 0 is going to
be assigned to a mac address. The aforementioned function replaces
memset. In addition, linux/etherdevice.h was included as a header
since it is the file that defines the inline function eth_zero_addr().
The changes were carried out using the following coccinelle script:
@header@
@@
#include <linux/etherdevice.h>
@eth_zero_addr@
expression e;
@@
-memset(e,0,ETH_ALEN);
+eth_zero_addr(e);
@eth_broadcast_addr@
identifier e;
@@
-memset(e,\(0xff\|0xFF\|255\),ETH_ALEN);
+eth_broadcast_addr(e);
@linux_header depends on !header && (eth_zero_addr || eth_broadcast_addr) @
@@
+ #include <linux/etherdevice.h>
+
@special_header depends on !header && !linux_header && (eth_zero_addr || eth_broadcast_addr) @
@@
+
+ #include <linux/etherdevice.h>
+
@custom_header depends on !header && !linux_header && !special_header && (eth_zero_addr || eth_broadcast_addr) @
@@
+
+ #include <linux/etherdevice.h>
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Removes extra parentheses around bitwise right shift operation.
The cases handled are when the resultant value is assigned to
a variable or when a shift operation is carried out for a function
argument. The issues were detected and resolved using the following
coccinelle script:
@@
expression e, e1;
constant c;
@@
e =
-(e1
+e1
>>
-c);
+c;
@@
identifier i;
constant c;
type t;
expression e;
@@
t i =
-(e
+e
>>
-c);
+c;
@@
expression e, e1;
identifier f;
constant c;
@@
e1 = f(...,
-(e
+e
>>
-c)
+c
,...);
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This patch introduces the use of API function setup_timer
instead of driver specific function _init_timer as it is
the preferred and standard way to setup and set the timer.
To be compatible with the change, argument types of
referenced functions are changed. Also, definition of
function _init_timer is removed as it is no longer needed
after this change.
This is done using Coccinelle and semantic patch used for
this is as follows:
@@ expression x, y; identifier a, b;@@
- _init_timer (&x, y, a, b);
+ setup_timer (&x, a, (unsigned long)b);
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Use timer API function del_timer instead of driver
specific function _cancel_timer_ex as it is a standard
way for deactivating a timer.
This is done using Coccinelle and semantic patch used for
this is as follows:
@@ expression x; @@
- _cancel_timer_ex (&x);
+ del_timer (&x);
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This patch introduces the use of API function mod_timer
instead of driver specific function _set_timer as it is
a more efficient and standard way to update the expire
field of an active timer. Also, definition of function
_set_timer is removed as it is no longer needed after
this change.
Here, these cases are handled using Coccinelle and
semantic patch used for this is as follows:
@@ expression x; expression y;@@
- _set_timer (&x, y);
+ mod_timer (&x, jiffies + msecs_to_jiffies (y));
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
* Fix checkpatch.pl warnings "Fix missing space after return type warning".
Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The check for return of schedule_timeout() has no effect on the
effective control flow of sleep_schedulable() so it can be dropped.
Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This is only an API consolidation to make things more readable.
Instances of var * HZ / 1000 are replaced by msecs_to_jiffies(var).
As msecs_to_jiffies will return > 0 if it is passed a value > 0 the
== 0 check is not needed.
Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This patch fixes the following checkpatch.pl warning:
Prefer ether_addr_copy() over memcpy()
if the Ethernet addresses are __aligned(2)
pahole showed that the struct used pnetdev->dev_addr
is aligned to u16.
Moreover mac is a simple array, pdata is a pointer that
starts from an even offset.
Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This patch removes an unneeded call to printk.
Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
mp_query_drv_var() was only being used by
oid_rt_pro_query_dr_variable_hdl() but after commit
<f4f5a59ff2e746885be3c1c06c1d0e8861a10ce8> mp_query_drv_var() became
unused. so it is safe to remove it.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Remove the function r8712_os_read_port() that is not used anywhere.
This was partially found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
checkpatch.pl fix for
ERROR: space prohibited before that ',' (ctx:WxE)
Signed-off-by: Max Perepelitsyn <mperepelitsyn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Removes some functions that are not used anywhere:
oid_rt_pro_h2c_get_rate_table_hdl() oid_rt_pro_h2c_set_rate_table_hdl()
oid_rt_pro_set_pwrstate_hdl() oid_rt_pro_qry_pwrstate_hdl()
oid_rt_pro_set_basic_rate_hdl() oid_rt_pro_set_power_tracking_hdl()
oid_rt_pro_set_data_rate_ex_hdl() oid_rt_pro_cfg_debug_message_hdl()
oid_rt_poll_rx_status_hdl() oid_rt_pro_set_rf_intfs_hdl()
oid_rt_wr_attrib_mem_hdl() oid_rt_rd_attrib_mem_hdl()
oid_rt_pro8711_pkt_loss_hdl() oid_rt_pro8711_wi_poll_hdl()
oid_rt_pro_write16_eeprom_hdl() oid_rt_pro_read16_eeprom_hdl()
oid_rt_pro_write_txcmd_hdl() oid_rt_pro_burst_write_register_hdl()
oid_rt_pro_burst_read_register_hdl() oid_rt_pro8711_join_bss_hdl()
oid_rt_pro_set_pkt_test_mode_hdl() oid_rt_pro_set_tx_agc_offset_hdl()
oid_rt_set_crystal_cap_hdl() oid_rt_pro_rw_efuse_pgpkt_hdl()
oid_rt_pro_rx_packet_type_hdl() oid_rt_pro_query_dr_variable_hdl()
oid_rt_pro_dele_sta_info_hdl() oid_rt_pro_add_sta_info_hdl()
oid_rt_pro_encryption_ctrl_hdl()
This was partially found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This patch fixes a brace warning in rtl871x_sta_mgt.c found
by the checkpatch.pl tool.
Signed-off-by: Paul Hedman <paul@mybb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|