Re: [PATCH] Staging: rtl8712: Addressed checkpatch.pl issues related to macro parameter wrapping in parentheses.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ricardo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]

url:    https://github.com/0day-ci/linux/commits/Ricardo-Ferreira/Staging-rtl8712-Addressed-checkpatch-pl-issues-related-to-macro-parameter-wrapping-in-parentheses/20200614-215316
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git af7b4801030c07637840191c69eb666917e4135d
config: x86_64-rhel-7.6 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All error/warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from drivers/staging/rtl8712/rtl871x_cmd.h:22,
from drivers/staging/rtl8712/drv_types.h:47,
from drivers/staging/rtl8712/hal_init.c:26:
drivers/staging/rtl8712/ieee80211.h:566:1: warning: alignment 1 of 'struct ieee80211_authentication' is less than 2 [-Wpacked-not-aligned]
566 | } __packed;
| ^
drivers/staging/rtl8712/ieee80211.h:574:1: warning: alignment 1 of 'struct ieee80211_probe_response' is less than 2 [-Wpacked-not-aligned]
574 | } __packed;
| ^
drivers/staging/rtl8712/ieee80211.h:578:1: warning: alignment 1 of 'struct ieee80211_probe_request' is less than 2 [-Wpacked-not-aligned]
578 | } __packed;
| ^
drivers/staging/rtl8712/ieee80211.h:585:1: warning: alignment 1 of 'struct ieee80211_assoc_request_frame' is less than 2 [-Wpacked-not-aligned]
585 | } __packed;
| ^
drivers/staging/rtl8712/ieee80211.h:592:1: warning: alignment 1 of 'struct ieee80211_assoc_response_frame' is less than 2 [-Wpacked-not-aligned]
592 | } __packed;
| ^
In file included from drivers/staging/rtl8712/osdep_service.h:31,
from drivers/staging/rtl8712/hal_init.c:25:
drivers/staging/rtl8712/hal_init.c: In function 'chk_fwhdr':
>> drivers/staging/rtl8712/basic_types.h:24:49: error: expected expression before ')' token
24 | #define FIELD_OFFSET(s, field) ((addr_t)&(((s) *)(0))->(field))
|                                                 ^
>> drivers/staging/rtl8712/hal_init.c:136:12: note: in expansion of macro 'FIELD_OFFSET'
136 |  fwhdrsz = FIELD_OFFSET(struct fw_hdr, fwpriv) + pfwhdr->fw_priv_sz;
|            ^~~~~~~~~~~~
drivers/staging/rtl8712/hal_init.c: In function 'rtl8712_dl_fw':
>> drivers/staging/rtl8712/basic_types.h:24:49: error: expected expression before ')' token
24 | #define FIELD_OFFSET(s, field) ((addr_t)&(((s) *)(0))->(field))
|                                                 ^
drivers/staging/rtl8712/hal_init.c:176:26: note: in expansion of macro 'FIELD_OFFSET'
176 |   ptr = (u8 *)mappedfw + FIELD_OFFSET(struct fw_hdr, fwpriv) +
|                          ^~~~~~~~~~~~
--
In file included from drivers/staging/rtl8712/rtl871x_cmd.h:22,
from drivers/staging/rtl8712/drv_types.h:47,
from drivers/staging/rtl8712/rtl871x_ioctl_linux.c:21:
drivers/staging/rtl8712/ieee80211.h:566:1: warning: alignment 1 of 'struct ieee80211_authentication' is less than 2 [-Wpacked-not-aligned]
566 | } __packed;
| ^
drivers/staging/rtl8712/ieee80211.h:574:1: warning: alignment 1 of 'struct ieee80211_probe_response' is less than 2 [-Wpacked-not-aligned]
574 | } __packed;
| ^
drivers/staging/rtl8712/ieee80211.h:578:1: warning: alignment 1 of 'struct ieee80211_probe_request' is less than 2 [-Wpacked-not-aligned]
578 | } __packed;
| ^
drivers/staging/rtl8712/ieee80211.h:585:1: warning: alignment 1 of 'struct ieee80211_assoc_request_frame' is less than 2 [-Wpacked-not-aligned]
585 | } __packed;
| ^
drivers/staging/rtl8712/ieee80211.h:592:1: warning: alignment 1 of 'struct ieee80211_assoc_response_frame' is less than 2 [-Wpacked-not-aligned]
592 | } __packed;
| ^
In file included from drivers/staging/rtl8712/osdep_service.h:31,
from drivers/staging/rtl8712/rtl871x_ioctl_linux.c:20:
drivers/staging/rtl8712/rtl871x_ioctl_linux.c: In function 'wpa_set_encryption':
>> drivers/staging/rtl8712/basic_types.h:24:49: error: expected expression before ')' token
24 | #define FIELD_OFFSET(s, field) ((addr_t)&(((s) *)(0))->(field))
|                                                 ^
>> drivers/staging/rtl8712/rtl871x_ioctl_linux.c:413:4: note: in expansion of macro 'FIELD_OFFSET'
413 |    FIELD_OFFSET(struct NDIS_802_11_WEP, KeyMaterial);
|    ^~~~~~~~~~~~
drivers/staging/rtl8712/rtl871x_ioctl_linux.c: In function 'r8711_wx_set_enc':
>> drivers/staging/rtl8712/basic_types.h:24:49: error: expected expression before ')' token
24 | #define FIELD_OFFSET(s, field) ((addr_t)&(((s) *)(0))->(field))
|                                                 ^
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1561:9: note: in expansion of macro 'FIELD_OFFSET'
1561 |         FIELD_OFFSET(struct NDIS_802_11_WEP, KeyMaterial);
|         ^~~~~~~~~~~~
In file included from drivers/staging/rtl8712/rtl871x_ioctl_linux.c:28:
At top level:
drivers/staging/rtl8712/rtl871x_mp_ioctl.h:256:34: warning: 'oid_rtl_seg_81_85' defined but not used [-Wunused-const-variable=]
256 | static const struct oid_obj_priv oid_rtl_seg_81_85[] = {
|                                  ^~~~~~~~~~~~~~~~~
drivers/staging/rtl8712/rtl871x_mp_ioctl.h:249:34: warning: 'oid_rtl_seg_81_80_80' defined but not used [-Wunused-const-variable=]
249 | static const struct oid_obj_priv oid_rtl_seg_81_80_80[] = {
|                                  ^~~~~~~~~~~~~~~~~~~~
drivers/staging/rtl8712/rtl871x_mp_ioctl.h:240:34: warning: 'oid_rtl_seg_81_80_40' defined but not used [-Wunused-const-variable=]
240 | static const struct oid_obj_priv oid_rtl_seg_81_80_40[] = {
|                                  ^~~~~~~~~~~~~~~~~~~~
drivers/staging/rtl8712/rtl871x_mp_ioctl.h:205:34: warning: 'oid_rtl_seg_81_80_20' defined but not used [-Wunused-const-variable=]
205 | static const struct oid_obj_priv oid_rtl_seg_81_80_20[] = {
|                                  ^~~~~~~~~~~~~~~~~~~~
drivers/staging/rtl8712/rtl871x_mp_ioctl.h:138:34: warning: 'oid_rtl_seg_81_80_00' defined but not used [-Wunused-const-variable=]
138 | static const struct oid_obj_priv oid_rtl_seg_81_80_00[] = {
|                                  ^~~~~~~~~~~~~~~~~~~~

vim +24 drivers/staging/rtl8712/basic_types.h

    21	
    22	#define SIZE_T __kernel_size_t
    23	#define sint signed int
  > 24	#define FIELD_OFFSET(s, field)	((addr_t)&(((s) *)(0))->(field))
    25	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux