Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1439632 > unrolled thread
| Started by | Eric Engestrom <eric.engestrom@imgtec.com> |
|---|---|
| First post | 2016-07-08 18:30 +0200 |
| Last post | 2016-07-08 21:40 +0200 |
| Articles | 5 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH 1/2] libnvdimm: add missing macros Eric Engestrom <eric.engestrom@imgtec.com> - 2016-07-08 18:30 +0200
[PATCH 2/2] netfilter: add missing macro Eric Engestrom <eric.engestrom@imgtec.com> - 2016-07-08 18:30 +0200
Re: [PATCH 2/2] netfilter: add missing macro kbuild test robot <lkp@intel.com> - 2016-07-08 19:10 +0200
Re: [PATCH 2/2] netfilter: add missing macro Pablo Neira Ayuso <pablo@netfilter.org> - 2016-07-11 12:50 +0200
Re: [PATCH 1/2] libnvdimm: add missing macros Dan Williams <dan.j.williams@intel.com> - 2016-07-08 21:40 +0200
| From | Eric Engestrom <eric.engestrom@imgtec.com> |
|---|---|
| Date | 2016-07-08 18:30 +0200 |
| Subject | [PATCH 1/2] libnvdimm: add missing macros |
| Message-ID | <rSGP8-79Y-13@gated-at.bofh.it> |
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
---
This can't compile without these macros… Is this header really used by anyone?
Should it be removed, to avoid bit-rot?
---
include/uapi/linux/ndctl.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h
index 309915f..50ae5e7 100644
--- a/include/uapi/linux/ndctl.h
+++ b/include/uapi/linux/ndctl.h
@@ -15,6 +15,14 @@
#include <linux/types.h>
+#ifdef __GNUC__
+#define __packed __attribute__((packed))
+#else
+#define __packed
+#endif
+
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr)[0])
+
struct nd_cmd_smart {
__u32 status;
__u8 data[128];
--
2.9.0
[toc] | [next] | [standalone]
| From | Eric Engestrom <eric.engestrom@imgtec.com> |
|---|---|
| Date | 2016-07-08 18:30 +0200 |
| Subject | [PATCH 2/2] netfilter: add missing macro |
| Message-ID | <rSGP9-79Y-47@gated-at.bofh.it> |
| In reply to | #1439632 |
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
[toc] | [prev] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2016-07-08 19:10 +0200 |
| Subject | Re: [PATCH 2/2] netfilter: add missing macro |
| Message-ID | <rSHrQ-7Gk-37@gated-at.bofh.it> |
| In reply to | #1439633 |
[Multipart message — attachments visible in raw view] — view raw
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
[toc] | [prev] | [next] | [standalone]
| From | Pablo Neira Ayuso <pablo@netfilter.org> |
|---|---|
| Date | 2016-07-11 12:50 +0200 |
| Subject | Re: [PATCH 2/2] netfilter: add missing macro |
| Message-ID | <rTGWK-5RP-9@gated-at.bofh.it> |
| In reply to | #1439633 |
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 >
[toc] | [prev] | [next] | [standalone]
| From | Dan Williams <dan.j.williams@intel.com> |
|---|---|
| Date | 2016-07-08 21:40 +0200 |
| Message-ID | <rSJMZ-CK-7@gated-at.bofh.it> |
| In reply to | #1439632 |
On Fri, Jul 8, 2016 at 9:29 AM, Eric Engestrom <eric.engestrom@imgtec.com> wrote: > Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> > --- > > This can't compile without these macros… Is this header really used by anyone? > Should it be removed, to avoid bit-rot? It's used by ndctl [1]. You can't use it directly in userspace, you need the kernel's "make headers_install" to strip out the kernel-specific macros. [1]: https://github.com/pmem/ndctl
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web