diff options
author | Kees Cook <keescook@chromium.org> | 2021-11-20 16:31:48 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-22 15:13:54 +0000 |
commit | fba84957e2e2e201cf4e352efe0c7cac0fbb5d5d (patch) | |
tree | f6711038ddfc05da565be7bcef2561bb45c1a6cc /net/core/skbuff.c | |
parent | cb902b332f9545635911063b671927defa5866bf (diff) | |
download | lwn-fba84957e2e2e201cf4e352efe0c7cac0fbb5d5d.tar.gz lwn-fba84957e2e2e201cf4e352efe0c7cac0fbb5d5d.zip |
skbuff: Move conditional preprocessor directives out of struct sk_buff
In preparation for using the struct_group() macro in struct sk_buff,
move the conditional preprocessor directives out of the region of struct
sk_buff that will be enclosed by struct_group(). While GCC and Clang are
happy with conditional preprocessor directives here, sparse is not, even
under -Wno-directive-within-macro[1], as would be seen under a C=1 build:
net/core/filter.c: note: in included file (through include/linux/netlink.h, include/linux/sock_diag.h):
./include/linux/skbuff.h:820:1: warning: directive in macro's argument list
./include/linux/skbuff.h:822:1: warning: directive in macro's argument list
./include/linux/skbuff.h:846:1: warning: directive in macro's argument list
./include/linux/skbuff.h:848:1: warning: directive in macro's argument list
Additionally remove empty macro argument definitions and usage.
"objdump -d" shows no object code differences.
[1] https://www.spinics.net/lists/linux-sparse/msg10857.html
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/skbuff.c')
0 files changed, 0 insertions, 0 deletions