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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Vaishali Thakkar [Fri, 20 Feb 2015 08:48:37 +0000 (14:18 +0530)]
Staging: rtl8188eu: 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>
Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vaishali Thakkar [Fri, 20 Feb 2015 07:28:50 +0000 (12:58 +0530)]
Staging: rtl8188eu: Remove unused struct ndis_802_11_key
This patch removes struct ndis_802_11_key as it is defined
in a header file but never used.
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Thu, 19 Feb 2015 19:14:41 +0000 (21:14 +0200)]
staging: comedi: drivers: replace init_timer by setup_timer
This patch replaces init_timer and 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;
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Katie Dunne [Thu, 19 Feb 2015 02:05:40 +0000 (18:05 -0800)]
Staging: media: mn88473: Match alignment with open parenthesis
Fixes the checkpatch.pl Check:
CHECK: Alignment should match open parenthesis
Increases readability by standardizing 7 argument indentations
Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vaishali Thakkar [Wed, 18 Feb 2015 16:52:38 +0000 (22:22 +0530)]
Staging: media: Change data value in setup_timer function
Here, data value 0xabadcafe in function setup_timer
seems like a nonsense value and timer handler function
is not using it anyway. So, change it to 0.
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vaishali Thakkar [Wed, 18 Feb 2015 16:52:29 +0000 (22:22 +0530)]
Staging: media: lirc: Use setup_timer
This patch introduces the use of function setup_timer
instead of structure assignments as it is the preferred
way to setup and set the timer.
This is done using Coccinelle and semantic patch used is
as follows:
@@
expression x,y,z;
@@
- init_timer (&x);
+ setup_timer (&x, y, z);
- x.function = y;
- x.data = z;
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Yeliz Taneroglu [Wed, 25 Feb 2015 23:26:36 +0000 (01:26 +0200)]
Staging: i2o: Add blank line
This patch fixes the checkpatch.pl warning:
WARNING: "Missing a blank line after declarations"
Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Yeliz Taneroglu [Wed, 25 Feb 2015 23:45:36 +0000 (01:45 +0200)]
Staging: i2o: 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>
aybuke ozdemir [Wed, 25 Feb 2015 22:10:21 +0000 (00:10 +0200)]
Staging: i2o: Remove unnecessary braces
Brackets were removed from the expression that containing single
statement. Removed following checkpatch.pl warnings:
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Wed, 25 Feb 2015 22:10:20 +0000 (00:10 +0200)]
Staging: i2o: Remove unnecessary 'out of memory' message
This patch removes unnecessay out of memory message fixing the following
checkpach.pl warning in device.c
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Fri, 20 Feb 2015 01:44:31 +0000 (03:44 +0200)]
staging: i2o: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
This patch fixes the following checkpatch.pl warning:
Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Fri, 20 Feb 2015 01:43:52 +0000 (03:43 +0200)]
staging: i2o: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
This patch fixes the following checkpatch.pl warning:
Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Wed, 18 Feb 2015 19:49:16 +0000 (01:19 +0530)]
Staging: i2o: Join quoted string split across lines
This patch removes the checkpatch.pl warnings "quoted string split accross lines"
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Wed, 18 Feb 2015 18:52:24 +0000 (00:22 +0530)]
Staging: i2o: Remove space after the * in a pointer type variable
This patch is to remove space after the * in pointer type function parameters
in function prototype and definition to follow kernel coding conventions.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Tue, 17 Feb 2015 22:22:07 +0000 (03:52 +0530)]
Staging: i2o: Convert comment from C99 style to C89 style
This patch fixes checkpatch.pl error in debug.c
ERROR: do not use C99 // comments
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Tue, 17 Feb 2015 21:37:20 +0000 (03:07 +0530)]
Staging: i2o: Use preferred library linux/uaccess.h over asm/uaccess.h
This patch fixes checkpatch.pl warning "Use #include
<linux/uaccess.h> instead of <asm/uaccess.h>" in i2o/config-osm.c .
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Sun, 22 Feb 2015 13:27:56 +0000 (15:27 +0200)]
Staging: vt6656: 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);
According to ether_addr_copy() description and functionality,
all Ethernet addresses should align to the u16 datatype.
The changes were applied using the following coccinelle rule:
Here is the output of pahole for the relevant datastructures:
struct vnt_usb_send_context {
void * priv; /* 0 8*/
struct sk_buff * skb; /* 8 8*/
struct urb * urb; /* 16 8*/
struct ieee80211_hdr * hdr; /* 24 8*/
unsigned int buf_len; /* 32 4*/
u32 frame_len; /* 36 4*/
u16 tx_hdr_size; /* 40 2*/
u16 tx_rate; /* 42 2*/
u8 type; /* 44 1*/
u8 pkt_no; /* 45 1*/
u8 pkt_type; /* 46 1*/
u8 need_ack; /* 47 1*/
u8 fb_option; /* 48 1*/
bool in_use; /* 49 1*/
unsigned char data[2900]; /* 50 2900*/
/* --- cacheline 46 boundary (2944 bytes) was 6 bytes ago --- */
/* size: 2952, cachelines: 47, members: 15 */
/* padding: 2 */
/* last cacheline: 8 bytes */
};
struct ieee80211_key_conf {
u32 cipher; /* 0 4*/
u8 icv_len; /* 4 1*/
u8 iv_len; /* 5 1*/
u8 hw_key_idx; /* 6 1*/
u8 flags; /* 7 1*/
s8 keyidx; /* 8 1*/
u8 keylen; /* 9 1*/
u8 key[0]; /* 10 0*/
/* size: 12, cachelines: 1, members: 8 */
/* padding: 2 */
/* last cacheline: 12 bytes */
};
struct vnt_mic_hdr {
u8 id; /* 0 1*/
u8 tx_priority; /* 1 1*/
u8 mic_addr2[6]; /* 2 6*/
u8 ccmp_pn[6]; /* 8 6*/
__be16 payload_len; /* 14 2*/
__be16 hlen; /* 16 2*/
__le16 frame_control; /* 18 2*/
u8 addr1[6]; /* 20 6*/
u8 addr2[6]; /* 26 6*/
u8 addr3[6]; /* 32 6*/
__le16 seq_ctrl; /* 38 2*/
u8 addr4[6]; /* 40 6*/
u16 packing; /* 46 2*/
/* size: 48, cachelines: 1, members: 13 */
/* last cacheline: 48 bytes */
};
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hatice ERTÜRK [Sat, 21 Feb 2015 20:37:16 +0000 (22:37 +0200)]
Staging: vt6655: changed C99 // comments
// erased and replace it with /* */ used.
Error found with checkpatch.pl
Signed-off-by: Hatice ERTURK <haticeerturk27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Katie Dunne [Fri, 20 Feb 2015 22:51:02 +0000 (14:51 -0800)]
Staging: vt6655: break lines over 80 characters
Addresses checkpatch.pl warning:
WARNING: line over 80 characters
Break 2 lines over 80 characters and align with opening parenthesis
Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Katie Dunne [Thu, 19 Feb 2015 23:43:12 +0000 (15:43 -0800)]
Staging: vt6655: Replace C99 comments with C89
Addresses the checkpatch.pl error:
ERROR: Do not use C99 // comments
Remove an unneeded comment line
Replace C99 comments with C89
Reduce multiple line comments to one line
Shorten comments over 80 line by removing blank space
Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu [Sun, 22 Feb 2015 10:18:04 +0000 (12:18 +0200)]
Staging: lustre: Deleted space prohibited between function name and open parenthesis
WARNING: space prohibited between function name and open parenthesis '('
Remove unnecessary space between function name and opening parenthesis.
That was found by running checkpatch
Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Sat, 21 Feb 2015 21:23:24 +0000 (23:23 +0200)]
Staging: lustre: Removed unnecessary spaces
Fix checkpatch.pl issues with "unnecessary whitespace before a quoted
newline" in llite_lib.c
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Sat, 21 Feb 2015 20:47:43 +0000 (22:47 +0200)]
Staging: lustre: use kstrtoul() instead of sscanf()
This patch makes checkpatch.pl by fixing the following warning:
WARNING: Prefer kstrto<type> to single variable sscanf.
I used to kstrtoul can convert unsigned long instead of sscanf
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Sat, 21 Feb 2015 21:19:46 +0000 (23:19 +0200)]
Staging: lustre: Removed unnecessary braces
This patch fixes checkpatch.pl warning in llite_lib.c
WARNING: braces {} are not necessary for any arm of this statement
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Fri, 20 Feb 2015 21:51:38 +0000 (23:51 +0200)]
Staging: lustre: Edit switch-case indent
This patch fixes indent as the codingStyle
of the kernel recommends in dir.c
Fix checkpatch.pl error:
ERROR: switch and case should be at the same indent.
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Fri, 20 Feb 2015 21:51:37 +0000 (23:51 +0200)]
Staging: lustre: Add blank line after variable declarations
This patch fixes "Missing a blank line after declarations" checkpatch.pl
warning in dir.c
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Fri, 20 Feb 2015 21:51:36 +0000 (23:51 +0200)]
Staging: lustre: Used "linux" instead of "asm"
This patch fixes "Use #include <linux/uaccess.h> instead of
<asm/uaccess.h"> checkpatch.pl warning in dir.c
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gulsah Kose [Sun, 22 Feb 2015 03:08:05 +0000 (05:08 +0200)]
staging: lustre: lnet: klnds: o2iblnd: Removed useless return keywords.
Removed return keyword from void functions. Removed following checkpatch.pl warnings:
WARNING: void function return statements are not generally useful
Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gulsah Kose [Sun, 22 Feb 2015 03:08:07 +0000 (05:08 +0200)]
staging: lustre: lnet: klnds: o2iblnd: 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>
Gulsah Kose [Sun, 22 Feb 2015 03:08:04 +0000 (05:08 +0200)]
staging: lustre: lnet: klnds: o2iblnd: Removed unnecessary spaces.
Removed unnecessary spaces between function name and open parenthesis '('.
Removed following checkpatch.pl warnings:
WARNING: space prohibited between function name and open parenthesis '('
Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu [Fri, 20 Feb 2015 13:35:30 +0000 (15:35 +0200)]
Staging: lustre: lnet: klnds: o2iblnd: Deleted space prohibited between function name and open parenthesis
WARNING: space prohibited between function name and open parenthesis '('
checkpatch.pl warning in o2iblnd_modparams.c
Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu [Fri, 20 Feb 2015 13:23:18 +0000 (15:23 +0200)]
Staging: lustre: lnet: klnds: o2iblnd: Remove intialization of static to 0
ERROR: do not initialise statics to 0 or NULL
checkpatch.pl error in o2iblnd_modparams.c
initial value unassigned static variables are automatically set to zero.
so it is unnecessary to assign the initial value to zero
Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
aybuke ozdemir [Thu, 19 Feb 2015 21:06:46 +0000 (23:06 +0200)]
Staging: lustre: lnet: add spaces around '||'
This fixes the checkpatch.pl error in conctl.c:
ERROR: spaces required around that '||' (ctx:VxE)
Signed-off-by: aybuke ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Melike Yurtoglu [Thu, 19 Feb 2015 20:25:40 +0000 (22:25 +0200)]
Staging: lustre: include: linux: libcfs: Remove spaces at the start of a line
This patch fixes checpatch.pl warning
WARNING: please, no spaces at the start of a line
Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Tue, 17 Feb 2015 18:34:18 +0000 (20:34 +0200)]
staging: lustre: ldlm: remove commented call to LBUG
This patch removes a commented call to LBUG since lustre should be
cleaned out of debugging macros before moving out of staging.
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aya Mahfouz [Thu, 19 Feb 2015 02:43:51 +0000 (04:43 +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>
Aya Mahfouz [Tue, 17 Feb 2015 17:48:51 +0000 (19:48 +0200)]
staging: fbtft: fix spacing errors
This patch fixes the following checkpatch.pl errors for
the file fb_bd663474.c:
ERROR: space prohibited before that close parenthesis ')'
ERROR: space prohibited after that open parenthesis '('
ERROR: space required after that ','
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vatika Harlalka [Tue, 17 Feb 2015 14:50:54 +0000 (20:20 +0530)]
Staging: emxx_udc: Convert from __attribute__((aligned(size))) to __aligned(size)
This patch addresses the checkpatch.pl warning
WARNING: __aligned(size) is preferred over __attribute__((aligned(size)))
aligned(x) is a macro :
#define __aligned(x) __attribute__((aligned(x)))
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>