linux/drivers/staging/rtl8712
Melike Yurtoglu c7c42826f9 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>
2015-02-26 15:08:36 -08:00
..
basic_types.h
drv_types.h staging: rtl8712: Do coding style cleanup 2015-02-07 17:39:50 +08:00
ethernet.h
hal_init.c staging: rtl8712: remove unused variables 2014-10-29 17:37:26 +08:00
ieee80211.c staging: rtl8712: remove unused variables 2014-10-29 17:37:26 +08:00
ieee80211.h staging: rtl8712, rtl8712: avoid lots of build warnings 2014-06-19 16:44:04 -07:00
Kconfig
Makefile
mlme_linux.c staging:rtl8712:mlme_linux.c: Adds blank lines to pass checkpatch.pl 2014-07-30 17:05:56 -07:00
mlme_osdep.h
mp_custom_oid.h
os_intfs.c
osdep_intf.h
osdep_service.h staging: rtl8712: condition with no effect removed 2015-02-07 17:24:59 +08:00
recv_linux.c Staging: rtl8712: replace memcpy() by ether_addr_copy() using coccinelle and pack variable 2015-02-26 15:08:36 -08:00
recv_osdep.h staging: rtl8712: recv_linux: Remove unused function 2015-01-25 19:59:18 +08:00
rtl871x_cmd.c staging: rtl8712: remove unused variables 2014-10-29 17:37:26 +08:00
rtl871x_cmd.h staging: rtl8712: remove wrapper function _init_listhead 2014-06-26 20:33:15 -04:00
rtl871x_debug.h
rtl871x_eeprom.c
rtl871x_eeprom.h
rtl871x_event.h
rtl871x_ht.h
rtl871x_io.c staging: rtl8712: Remove unnecessary cast for argument of kfree 2014-10-20 10:29:19 +08:00
rtl871x_io.h staging: rtl8712: add new line after declarations 2014-09-28 22:41:23 -04:00
rtl871x_ioctl_linux.c staging: rtl8712: remove spaces before commas 2015-01-17 14:20:25 -08:00
rtl871x_ioctl_rtl.c
rtl871x_ioctl_rtl.h
rtl871x_ioctl_set.c staging: rtl8712: remove unused variables 2014-10-29 17:37:26 +08:00
rtl871x_ioctl_set.h
rtl871x_ioctl.h Staging: rtl8712: Add space after return type 2014-09-23 08:14:36 -07:00
rtl871x_led.h staging: rtl8712: remove #define _workitem struct work_struct 2014-07-09 12:30:46 -07:00
rtl871x_mlme.c staging: rtl8712: remove spaces before commas 2015-01-17 14:20:25 -08:00
rtl871x_mlme.h
rtl871x_mp_ioctl.c staging: rtl8712: remove unused function 2015-01-25 19:59:19 +08:00
rtl871x_mp_ioctl.h staging: rtl8712: rtl871x_mp_ioctl.c: Remove some unused functions 2015-01-17 14:10:03 -08:00
rtl871x_mp_phy_regdef.h
rtl871x_mp.c staging: rtl8712: Delete explicit comparison with false and NULL 2014-10-20 10:29:11 +08:00
rtl871x_mp.h Staging: rtl8712: remove semicolon after macro 2014-09-23 08:04:57 -07:00
rtl871x_pwrctrl.c staging: rtl8712: remove unused variables 2014-10-29 17:37:26 +08:00
rtl871x_pwrctrl.h staging: rtl8712: remove spaces before commas 2015-01-17 14:20:25 -08:00
rtl871x_recv.c staing: rtl8712: else after return or break warning 2015-02-26 15:08:36 -08:00
rtl871x_recv.h staging: rtl8712: remove unused variables 2014-10-29 17:37:26 +08:00
rtl871x_rf.h
rtl871x_security.c staging: rtl8712: remove unused variables 2014-10-29 17:37:26 +08:00
rtl871x_security.h
rtl871x_sta_mgt.c staging: rtl8712: remove spaces before commas 2015-01-17 14:20:25 -08:00
rtl871x_wlan_sme.h
rtl871x_xmit.c staging: rtl8712: remove spaces before commas 2015-01-17 14:20:25 -08:00
rtl871x_xmit.h staging: rtl8712: remove #define _workitem struct work_struct 2014-07-09 12:30:46 -07:00
rtl8712_bitdef.h
rtl8712_cmd.c staging: rtl8712: remove unused variables 2014-10-29 17:37:26 +08:00
rtl8712_cmd.h staging: rtl8712: remove spaces before commas 2015-01-17 14:20:25 -08:00
rtl8712_cmdctrl_bitdef.h
rtl8712_cmdctrl_regdef.h
rtl8712_debugctrl_bitdef.h
rtl8712_debugctrl_regdef.h
rtl8712_edcasetting_bitdef.h
rtl8712_edcasetting_regdef.h
rtl8712_efuse.c staging: rtl8712: remove unused variables 2014-10-29 17:37:26 +08:00
rtl8712_efuse.h
rtl8712_event.h staging: rtl8712: remove spaces before commas 2015-01-17 14:20:25 -08:00
rtl8712_fifoctrl_bitdef.h
rtl8712_fifoctrl_regdef.h
rtl8712_gp_bitdef.h
rtl8712_gp_regdef.h
rtl8712_hal.h
rtl8712_interrupt_bitdef.h
rtl8712_io.c staging: rtl8712: add new line after declarations 2014-09-28 22:41:23 -04:00
rtl8712_led.c staging: rtl8712: remove wrapper function _set_workitem() 2014-07-09 12:30:46 -07:00
rtl8712_macsetting_bitdef.h
rtl8712_macsetting_regdef.h
rtl8712_powersave_bitdef.h
rtl8712_powersave_regdef.h
rtl8712_ratectrl_bitdef.h
rtl8712_ratectrl_regdef.h
rtl8712_recv.c staging: rtl8712: remove unnecessary else after return 2014-12-02 16:54:43 -08:00
rtl8712_recv.h
rtl8712_regdef.h
rtl8712_security_bitdef.h
rtl8712_spec.h
rtl8712_syscfg_bitdef.h
rtl8712_syscfg_regdef.h
rtl8712_timectrl_bitdef.h
rtl8712_timectrl_regdef.h
rtl8712_wmac_bitdef.h
rtl8712_wmac_regdef.h
rtl8712_xmit.c staging: rtl8712: add new line after declarations 2014-09-28 22:41:23 -04:00
rtl8712_xmit.h
sta_info.h staging: rtl8712: remove spaces before commas 2015-01-17 14:20:25 -08:00
TODO
usb_halinit.c
usb_intf.c staging: rtl8712: fix Prefer ether_addr_copy() over memcpy() 2015-02-07 17:15:43 +08:00
usb_ops_linux.c staging: rtl8712: remove unused variables 2014-10-29 17:37:26 +08:00
usb_ops.c
usb_ops.h
usb_osintf.h
wifi.h
wlan_bssdef.h
xmit_linux.c staging: rtl8712: remove unused variables 2014-10-29 17:37:26 +08:00
xmit_osdep.h