aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-04-03staging: rtl8712: Drop unneeded cast on netdev_privJulia Lawall3-41/+41
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>
2015-04-01Staging: rtl8712: Remove zero-testing pointer typed valueAmitoj Kaur Chawla1-1/+1
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>
2015-04-01Staging: rtl8712: Remove duplicated argument to |Cristina Opriceana1-2/+1
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>
2015-04-01Staging: rtl8712: Use memdup_user() instead of copy_from_user()Cristina Opriceana1-7/+3
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>
2015-03-18Staging: rtl8712: replace memcpy with ether_addr_copyHaneen Mohammed1-2/+2
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>
2015-03-16Staging: rtl8712: Replace __constant_cpu_to_le16Dilek Uzulmez1-2/+2
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>
2015-03-16Staging: rtl8712: fix potential null pointer dereferenceMatteo Semenzato1-0/+2
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>
2015-03-16Staging: rtl8712: remove else after return statementHaneen Mohammed1-11/+9
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>
2015-03-16Staging: rtl8712: Eliminate use of _cancel_timerVaishali Thakkar4-16/+4
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>
2015-03-16Staging: rtl8712: Eliminate use of _cancel_timer_exVaishali Thakkar6-88/+82
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>
2015-03-09Staging rtl8172: Remove unnecessary typecastVatika Harlalka1-1/+1
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>
2015-03-09drivers: staging: rtl8712: Removed unnecessary parenthesesTina Johnson1-2/+2
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>
2015-03-06staging: rtl8712: replace memset(x,0,ETH_ALEN)Aya Mahfouz1-4/+5
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>
2015-03-06staging: rtl8712: remove extra parentheses around right bit shift operationAya Mahfouz2-4/+4
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>
2015-03-06Staging: rtl8712: Eliminate use of _init_timerVaishali Thakkar8-49/+40
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>
2015-03-01Staging: rtl8712: Use del_timerVaishali Thakkar1-1/+1
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>
2015-03-01Staging: rtl8712: Eliminate use of _set_timerVaishali Thakkar8-174/+199
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>
2015-02-26staging: rtl8712: rewrite the right hand side of an assignmentAya Mahfouz1-1/+1
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>
2015-02-26staging: rtl8712: rewrite the right hand side of an assignmentAya Mahfouz1-5/+5
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>
2015-02-26staging: rtl8712: rewrite the right hand side of an assignmentAya Mahfouz1-2/+2
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>
2015-02-26staging: rtl8712: rewrite the right hand side of an assignmentAya Mahfouz1-2/+2
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>
2015-02-26Staging: rtl8712: Use mod_timerVaishali Thakkar1-3/+4
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>
2015-02-26Staging: rtl8712: Remove unused macrosKatie Dunne1-23/+0
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>
2015-02-26Staging: rtl8712: replace memcpy() by ether_addr_copy() using coccinelle and pack variableMelike Yurtoglu1-5/+5
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>
2015-02-26Staging: rtl8712: replace memcpy() by ether_addr_copy() using coccinelle and pack variableMelike Yurtoglu1-1/+1
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>
2015-02-26staing: rtl8712: else after return or break warningGamze POLAT1-2/+1
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>
2015-02-07staging: rtl8712: Do coding style cleanupMichael Hornung1-3/+3
* 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>
2015-02-07staging: rtl8712: condition with no effect removedNicholas Mc Guire1-2/+1
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>
2015-02-07staging: rtl8712: cleanup of timeout conversionsNicholas Mc Guire1-4/+2
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>
2015-02-07staging: rtl8712: fix Prefer ether_addr_copy() over memcpy()Heba Aamer1-2/+2
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>
2015-01-28staging: rtl8712: remove useless printing lineHeba Aamer1-1/+0
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>
2015-01-25staging: rtl8712: remove unused functionSudip Mukherjee1-7/+0
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>
2015-01-25staging: rtl8712: recv_linux: Remove unused functionRickard Strandqvist2-15/+0
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>
2015-01-17staging: rtl8712: remove spaces before commasMax Perepelitsyn8-25/+25
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>
2015-01-17staging: rtl8712: rtl871x_mp_ioctl.c: Remove some unused functionsRickard Strandqvist2-564/+0
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>
2015-01-12Staging: rtl8712: Fixes brace coding style in rtl871x_sta_mgt.cPaul Hedman1-2/+1
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>
2014-12-02staging: rtl8712: remove unnecessary else after returnMike Krinkin1-5/+4
Fixes checkpatch warning: WARNING: else is not generally useful after a break or return Signed-off-by: Mike Krinkin <krinkin.m.u@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: rtl8712: remove unused variablesSudip Mukherjee19-137/+30
unused variables are removed. These variables were only assigned some values and after that they were never being used. So they are safe to be removed , and it has been build tested. I left a call to r8712_read32(padapter, TCR) and r8712_read8(padapter, SDIO_HCPWM) . r8712_read32() and r8712_read8() is ultimately calling usb_read32() and usb_read8() respectively. and they are again calling r8712_usbctrl_vendorreq(). this r8712_usbctrl_vendorreq() is communicating through the usb bus and is sending and receiving the control msg. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: rtl8712: Remove redundant castRasmus Villemoes1-1/+1
struct firmware::data has type const u8*, as does *ppmappedfw, so the cast to u8* is unnecessary and slightly confusing. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: rtl8712: Fix unnecessary parentheses style warning in rtl871x_xmit.cEsra Altintas1-1/+1
This fixes the following checkpatch.pl warning: WARNING: Unnecessary parentheses - maybe == should be = ? Signed-off-by: Esra Altintas <es.altintas@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: rtl8712: fix unnecessary elses after return/break in rtl8712_efuse.cSerguey Parkhomovsky1-20/+20
This patch fixes two unnecessary else conditions that were found by checkpatch.pl. Signed-off-by: Serguey Parkhomovsky <sergueyparkhomovsky@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20Staging: rtl8712:ieee80211 remove unnecessary elseNitin Kuppelur1-8/+6
Removed unnecessary else after return/break to solve checkpatch.pl warning Signed-off-by: Nitin Kuppelur <nitinkuppelur@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: rtl8712: Remove unnecessary cast for argument of kfreeTapasweni Pathak4-33/+33
This patch removes all occurrences of unnecessary cast on the argument to kfree, all over in rtl8712. There is no need of the cast on the argument to kfree. Greped to find occurrences. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: rtl8712: Delete explicit comparison with false and NULLTapasweni Pathak6-23/+21
This patch delete explicit comparison to false and NULL in files of rtl8712. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: rtl8712: Fixed else not required after returnSarah Khan1-6/+2
WARNING: else is generally not required after return checkpatch.pl warning in osdep_service.h Signed-off-by: Sarah Khan <sarahjmi07@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: rtl8712: Replace "the the " with "the"Tapasweni Pathak1-1/+1
This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02staging: rtl8712: Fixed else not required after returnSarah Khan1-4/+2
WARNING: Else generally not required after return checkpatch.pl warning in hal_init.c Fixed by removing else Signed-off-by: Sarah Khan <sarahjmi07@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02staging: rtl8712: Fix missing blank line warningMelike Yurtoglu1-0/+1
Fixes "Missing a blank line after declarations" checkpatch.pl warning in usb_ops_linux.c Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02staging: rtl8712: Fix unnecessary parentheses style warningYeliz Taneroglu1-1/+1
This fixes the following checkpatch.pl warning: drivers/staging/rtl8712/rtl871x_recv.c:634 warning: Unnecessary parentheses - maybe == should be = ? Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28staging: rtl8712: add new line after declarationsTapasweni Pathak7-1/+20
This patch fixes checkpatch.pl warning in hal_init.c file WARNING : Missing a blank line after declarations Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>