Re: [PATCH 2/2] netfilter: add missing macro

From: kbuild test robot
Date: Fri Jul 08 2016 - 13:01:38 EST


Hi,

[auto build test WARNING on linux-nvdimm/libnvdimm-for-next]
[also build test WARNING on v4.7-rc6 next-20160708]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Eric-Engestrom/libnvdimm-add-missing-macros/20160709-003310
base: https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git libnvdimm-for-next
config: m68k-sun3_defconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=m68k

All warnings (new ones prefixed by >>):

In file included from net/netfilter/xt_sctp.c:10:0:
>> include/uapi/linux/netfilter/xt_sctp.h:6:0: warning: "ARRAY_SIZE" redefined
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr)[0])
^
In file included from include/linux/list.h:8:0,
from include/linux/module.h:9,
from net/netfilter/xt_sctp.c:2:
include/linux/kernel.h:54:0: note: this is the location of the previous definition
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^

vim +/ARRAY_SIZE +6 include/uapi/linux/netfilter/xt_sctp.h

1 #ifndef _XT_SCTP_H_
2 #define _XT_SCTP_H_
3
4 #include <linux/types.h>
5
> 6 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr)[0])
7
8 #define XT_SCTP_SRC_PORTS 0x01
9 #define XT_SCTP_DEST_PORTS 0x02
10 #define XT_SCTP_CHUNK_TYPES 0x04
11
12 #define XT_SCTP_VALID_FLAGS 0x07
13
14 struct xt_sctp_flag_info {

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data