Message ID | 1561042360-20480-1-git-send-email-cai@lca.pw |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | [-next] inet: fix compilation warnings in fqdir_pre_exit() | expand |
On Thu, Jun 20, 2019 at 10:52 AM Qian Cai <cai@lca.pw> wrote: > > The linux-next commit "inet: fix various use-after-free in defrags > units" [1] introduced compilation warnings, > > ./include/net/inet_frag.h:117:1: warning: 'inline' is not at beginning > of declaration [-Wold-style-declaration] > static void inline fqdir_pre_exit(struct fqdir *fqdir) > ^~~~~~ Interesting warning, this is kind of new compiler major feature I guess :/ BTW : $ git grep -n "static void inline" | wc -l 9
From: Qian Cai <cai@lca.pw> Date: Thu, 20 Jun 2019 10:52:40 -0400 > The linux-next commit "inet: fix various use-after-free in defrags > units" [1] introduced compilation warnings, > > ./include/net/inet_frag.h:117:1: warning: 'inline' is not at beginning > of declaration [-Wold-style-declaration] > static void inline fqdir_pre_exit(struct fqdir *fqdir) > ^~~~~~ > In file included from ./include/net/netns/ipv4.h:10, > from ./include/net/net_namespace.h:20, > from ./include/linux/netdevice.h:38, > from ./include/linux/icmpv6.h:13, > from ./include/linux/ipv6.h:86, > from ./include/net/ipv6.h:12, > from ./include/rdma/ib_verbs.h:51, > from ./include/linux/mlx5/device.h:37, > from ./include/linux/mlx5/driver.h:51, > from > drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c:37: > > [1] https://lore.kernel.org/netdev/20190618180900.88939-3-edumazet@google.com/ > > Signed-off-by: Qian Cai <cai@lca.pw> Applied.
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index 46574d996f1d..010f26b31c89 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h @@ -114,7 +114,7 @@ struct inet_frags { int fqdir_init(struct fqdir **fqdirp, struct inet_frags *f, struct net *net); -static void inline fqdir_pre_exit(struct fqdir *fqdir) +static inline void fqdir_pre_exit(struct fqdir *fqdir) { fqdir->high_thresh = 0; /* prevent creation of new frags */ fqdir->dead = true;
The linux-next commit "inet: fix various use-after-free in defrags units" [1] introduced compilation warnings, ./include/net/inet_frag.h:117:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] static void inline fqdir_pre_exit(struct fqdir *fqdir) ^~~~~~ In file included from ./include/net/netns/ipv4.h:10, from ./include/net/net_namespace.h:20, from ./include/linux/netdevice.h:38, from ./include/linux/icmpv6.h:13, from ./include/linux/ipv6.h:86, from ./include/net/ipv6.h:12, from ./include/rdma/ib_verbs.h:51, from ./include/linux/mlx5/device.h:37, from ./include/linux/mlx5/driver.h:51, from drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c:37: [1] https://lore.kernel.org/netdev/20190618180900.88939-3-edumazet@google.com/ Signed-off-by: Qian Cai <cai@lca.pw> --- include/net/inet_frag.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)