* [PATCH 2/2] netfilter: add missing macro
[not found] <20160708162911.18756-1-eric.engestrom@imgtec.com>
@ 2016-07-08 16:29 ` Eric Engestrom
2016-07-08 17:00 ` kbuild test robot
2016-07-11 10:41 ` Pablo Neira Ayuso
0 siblings, 2 replies; 3+ messages in thread
From: Eric Engestrom @ 2016-07-08 16:29 UTC (permalink / raw)
To: linux-kernel
Cc: Eric Engestrom, Eric Engestrom, Pablo Neira Ayuso,
Patrick McHardy, Jozsef Kadlecsik, netfilter-devel, coreteam
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
---
This can't compile without this macro… Is this header really used by anyone?
Should it be removed, to avoid bit-rot?
---
include/uapi/linux/netfilter/xt_sctp.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/uapi/linux/netfilter/xt_sctp.h b/include/uapi/linux/netfilter/xt_sctp.h
index 58ffcfb..e4410db 100644
--- a/include/uapi/linux/netfilter/xt_sctp.h
+++ b/include/uapi/linux/netfilter/xt_sctp.h
@@ -3,6 +3,8 @@
#include <linux/types.h>
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr)[0])
+
#define XT_SCTP_SRC_PORTS 0x01
#define XT_SCTP_DEST_PORTS 0x02
#define XT_SCTP_CHUNK_TYPES 0x04
--
2.9.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] netfilter: add missing macro
2016-07-08 16:29 ` [PATCH 2/2] netfilter: add missing macro Eric Engestrom
@ 2016-07-08 17:00 ` kbuild test robot
2016-07-11 10:41 ` Pablo Neira Ayuso
1 sibling, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2016-07-08 17:00 UTC (permalink / raw)
To: Eric Engestrom
Cc: kbuild-all, linux-kernel, Eric Engestrom, Eric Engestrom,
Pablo Neira Ayuso, Patrick McHardy, Jozsef Kadlecsik,
netfilter-devel, coreteam
[-- Attachment #1: Type: text/plain, Size: 1946 bytes --]
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 #2: .config.gz --]
[-- Type: application/octet-stream, Size: 11731 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] netfilter: add missing macro
2016-07-08 16:29 ` [PATCH 2/2] netfilter: add missing macro Eric Engestrom
2016-07-08 17:00 ` kbuild test robot
@ 2016-07-11 10:41 ` Pablo Neira Ayuso
1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2016-07-11 10:41 UTC (permalink / raw)
To: Eric Engestrom
Cc: linux-kernel, Eric Engestrom, Patrick McHardy, Jozsef Kadlecsik,
netfilter-devel, coreteam
On Fri, Jul 08, 2016 at 05:29:11PM +0100, Eric Engestrom wrote:
> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
> ---
>
> This can't compile without this macro… Is this header really used by anyone?
> Should it be removed, to avoid bit-rot?
Probably better to define something like:
#define SCTP_BITMAP_LEN (256 / sizeof (u_int32_t))
and use it consistently all around the code, so we can get rid of
these ARRAY_SIZE() from the uapi header.
> ---
> include/uapi/linux/netfilter/xt_sctp.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/uapi/linux/netfilter/xt_sctp.h b/include/uapi/linux/netfilter/xt_sctp.h
> index 58ffcfb..e4410db 100644
> --- a/include/uapi/linux/netfilter/xt_sctp.h
> +++ b/include/uapi/linux/netfilter/xt_sctp.h
> @@ -3,6 +3,8 @@
>
> #include <linux/types.h>
>
> +#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr)[0])
> +
> #define XT_SCTP_SRC_PORTS 0x01
> #define XT_SCTP_DEST_PORTS 0x02
> #define XT_SCTP_CHUNK_TYPES 0x04
> --
> 2.9.0
>
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-11 10:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20160708162911.18756-1-eric.engestrom@imgtec.com>
2016-07-08 16:29 ` [PATCH 2/2] netfilter: add missing macro Eric Engestrom
2016-07-08 17:00 ` kbuild test robot
2016-07-11 10:41 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).