Skip to content

Commit 318d3cc

Browse files
arndbdavem330
authored andcommitted
net: xfrm: fix old-style declaration
Modern C standards expect the '__inline__' keyword to come before the return type in a declaration, and we get a couple of warnings for this with "make W=1" in the xfrm{4,6}_policy.c files: net/ipv6/xfrm6_policy.c:369:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration] static int inline xfrm6_net_sysctl_init(struct net *net) net/ipv6/xfrm6_policy.c:374:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration] static void inline xfrm6_net_sysctl_exit(struct net *net) net/ipv4/xfrm4_policy.c:339:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration] static int inline xfrm4_net_sysctl_init(struct net *net) net/ipv4/xfrm4_policy.c:344:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration] static void inline xfrm4_net_sysctl_exit(struct net *net) Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 278af57 commit 318d3cc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

net/ipv4/xfrm4_policy.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ static struct ctl_table xfrm4_policy_table[] = {
295295
{ }
296296
};
297297

298-
static int __net_init xfrm4_net_sysctl_init(struct net *net)
298+
static __net_init int xfrm4_net_sysctl_init(struct net *net)
299299
{
300300
struct ctl_table *table;
301301
struct ctl_table_header *hdr;
@@ -323,7 +323,7 @@ static int __net_init xfrm4_net_sysctl_init(struct net *net)
323323
return -ENOMEM;
324324
}
325325

326-
static void __net_exit xfrm4_net_sysctl_exit(struct net *net)
326+
static __net_exit void xfrm4_net_sysctl_exit(struct net *net)
327327
{
328328
struct ctl_table *table;
329329

@@ -336,12 +336,12 @@ static void __net_exit xfrm4_net_sysctl_exit(struct net *net)
336336
kfree(table);
337337
}
338338
#else /* CONFIG_SYSCTL */
339-
static int inline xfrm4_net_sysctl_init(struct net *net)
339+
static inline int xfrm4_net_sysctl_init(struct net *net)
340340
{
341341
return 0;
342342
}
343343

344-
static void inline xfrm4_net_sysctl_exit(struct net *net)
344+
static inline void xfrm4_net_sysctl_exit(struct net *net)
345345
{
346346
}
347347
#endif

net/ipv6/xfrm6_policy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,12 +366,12 @@ static void __net_exit xfrm6_net_sysctl_exit(struct net *net)
366366
kfree(table);
367367
}
368368
#else /* CONFIG_SYSCTL */
369-
static int inline xfrm6_net_sysctl_init(struct net *net)
369+
static inline int xfrm6_net_sysctl_init(struct net *net)
370370
{
371371
return 0;
372372
}
373373

374-
static void inline xfrm6_net_sysctl_exit(struct net *net)
374+
static inline void xfrm6_net_sysctl_exit(struct net *net)
375375
{
376376
}
377377
#endif

0 commit comments

Comments
 (0)