linux/drivers/staging
Melike Yurtoglu d55519ab9b 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>
2015-02-26 15:08:36 -08:00
..
android Staging drivers patches for 3.20-rc1 2015-02-15 11:30:39 -08:00
board Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2015-02-19 10:36:45 -08:00
clocking-wizard staging: clocking-wizard: Handle invalid clk in notifier 2015-01-17 16:06:20 -08:00
comedi staging: comedi: drivers: replace init_timer by setup_timer 2015-02-26 12:31:53 -08:00
dgap staging: dgap: fix "if" statement that always evaluates to true 2015-01-25 20:08:13 +08:00
dgnc Staging: dgnc: Removed trailing whitespace 2015-02-26 13:15:41 -08:00
emxx_udc Staging: emxx_udc: Convert from __attribute__((aligned(size))) to __aligned(size) 2015-02-24 15:28:35 -08:00
fbtft Staging: fbtft: removed trailing whitespace 2015-02-26 13:11:27 -08:00
ft1000 staging: ft1000: fix braces warning 2015-02-07 17:37:52 +08:00
fwserial staging: fwserial: remove multiple blank lines 2014-11-26 13:53:25 -08:00
gdm72xx More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
gdm724x staging: gdm724x: fix line limit coding style issue in gdm_lte.c 2015-01-17 14:57:43 -08:00
goldfish
gs_fpgaboot staging: gs_fpgaboot: io.c: Remove unused function 2015-01-17 15:19:52 -08:00
i2o Staging: i2o: Add blank line 2015-02-26 12:23:59 -08:00
iio Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2015-02-19 10:36:45 -08:00
lustre Staging: lustre: Deleted space prohibited between function name and open parenthesis 2015-02-26 12:23:58 -08:00
media Staging: media: mn88473: Match alignment with open parenthesis 2015-02-26 12:23:59 -08:00
mt29f_spinand staging: mt29f_spinand: Fix typo in Kconfig 2015-01-17 16:22:15 -08:00
netlogic Staging: NetLogic: Coding style correction 2015-01-17 15:17:10 -08:00
nvec staging: nvec: specify a platform-device base id 2015-01-25 19:04:31 +08:00
octeon Staging: octeon: Fixed a typo 2015-01-17 15:00:23 -08:00
octeon-usb Staging: octeon-usb: Fixed a typo 2015-01-17 15:00:23 -08:00
olpc_dcon staging: olpc_dcon: fix sparse symbol not declared warning 2015-01-17 15:17:10 -08:00
ozwpan Staging patches for 3.19-rc1 2014-12-15 18:06:13 -08:00
panel staging: panel: replace init_timer by setup_timer 2015-02-26 13:12:40 -08:00
rtl8188eu Staging: rtl8188eu: Replace if-else block with switch-case 2015-02-26 12:56:58 -08:00
rtl8192e Staging: rtl8192e: Fixed unnecessary line continuation. 2015-02-07 17:25:43 +08:00
rtl8192u Staging: rtl8192u: Simplify if condition 2015-02-26 13:46:35 -08:00
rtl8712 Staging: rtl8712: replace memcpy() by ether_addr_copy() using coccinelle and pack variable 2015-02-26 15:08:36 -08:00
rtl8723au Staging: rtl8723au: Add blank line after declarations 2015-02-26 13:04:53 -08:00
rts5208 Staging: rts5208: Remove braces around single if-statement 2015-02-26 13:01:14 -08:00
skein staging: skein: Fixing single statement macro checkpatch warning 2015-01-17 15:05:52 -08:00
slicoss staging: slicloss: replace init_timer by setup_timer 2015-02-26 13:12:40 -08:00
sm7xxfb staging: sm7xxfb: fix remaining CamelCase 2015-02-07 17:37:52 +08:00
speakup Staging drivers patches for 3.20-rc1 2015-02-15 11:30:39 -08:00
ste_rmi4
unisys staging: unisys: Fix typo in comment 2015-02-07 17:18:38 +08:00
vme
vt6655 Staging: vt6655: changed C99 // comments 2015-02-26 12:23:58 -08:00
vt6656 Staging: vt6656: replace memcpy() by ether_addr_copy() using coccinelle and pack variable 2015-02-26 12:23:58 -08:00
wlan-ng staging: wlan-ng: replace init_timer by setup_timer 2015-02-26 13:12:40 -08:00
xgifb staging: xgifb: fix colours on big-endian machines other than powerpc 2015-02-07 17:24:11 +08:00
Kconfig Staging drivers patches for 3.20-rc1 2015-02-15 11:30:39 -08:00
Makefile Staging drivers patches for 3.20-rc1 2015-02-15 11:30:39 -08:00
staging.c