netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: netdev@vger.kernel.org,
	Steffen Klassert <steffen.klassert@secunet.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	James Morris <jmorris@namei.org>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	Patrick McHardy <kaber@trash.net>,
	David Ahern <dsa@cumulusnetworks.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 7/8] net: xfrm: fix old-style declaration
Date: Thu, 16 Jun 2016 15:59:25 +0200	[thread overview]
Message-ID: <12896147.Nph51CCL66@wuerfel> (raw)
In-Reply-To: <20160616135020.3154461-1-arnd@arndb.de>

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 <arnd@arndb.de>
---
 net/ipv4/xfrm4_policy.c | 8 ++++----
 net/ipv6/xfrm6_policy.c | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index 7b0edb37a115..b644a23c3db0 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -295,7 +295,7 @@ static struct ctl_table xfrm4_policy_table[] = {
 	{ }
 };
 
-static int __net_init xfrm4_net_sysctl_init(struct net *net)
+static __net_init int xfrm4_net_sysctl_init(struct net *net)
 {
 	struct ctl_table *table;
 	struct ctl_table_header *hdr;
@@ -323,7 +323,7 @@ err_alloc:
 	return -ENOMEM;
 }
 
-static void __net_exit xfrm4_net_sysctl_exit(struct net *net)
+static __net_exit void xfrm4_net_sysctl_exit(struct net *net)
 {
 	struct ctl_table *table;
 
@@ -336,12 +336,12 @@ static void __net_exit xfrm4_net_sysctl_exit(struct net *net)
 		kfree(table);
 }
 #else /* CONFIG_SYSCTL */
-static int inline xfrm4_net_sysctl_init(struct net *net)
+static inline int xfrm4_net_sysctl_init(struct net *net)
 {
 	return 0;
 }
 
-static void inline xfrm4_net_sysctl_exit(struct net *net)
+static inline void xfrm4_net_sysctl_exit(struct net *net)
 {
 }
 #endif
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index c074771a10f7..6cc97003e4a9 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -366,12 +366,12 @@ static void __net_exit xfrm6_net_sysctl_exit(struct net *net)
 		kfree(table);
 }
 #else /* CONFIG_SYSCTL */
-static int inline xfrm6_net_sysctl_init(struct net *net)
+static inline int xfrm6_net_sysctl_init(struct net *net)
 {
 	return 0;
 }
 
-static void inline xfrm6_net_sysctl_exit(struct net *net)
+static inline void xfrm6_net_sysctl_exit(struct net *net)
 {
 }
 #endif
-- 
2.9.0

  parent reply	other threads:[~2016-06-16 13:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 13:50 [PATCH 0/8] net: fix old-style declarations Arnd Bergmann
2016-06-16 13:52 ` [PATCH 1/8] wireless: airo: rename 'register' variable Arnd Bergmann
2016-06-16 13:52   ` [PATCH 2/8] wireless: brcmsmac: fix old-style declaration Arnd Bergmann
2016-06-16 13:52   ` [PATCH 3/8] wireless: ipw2200: " Arnd Bergmann
2016-06-24 17:46     ` Stanislav Yakovlev
2016-06-16 13:52   ` [PATCH 4/8] hamradio: baycom: " Arnd Bergmann
2016-06-17  5:06     ` David Miller
2016-06-16 13:52   ` [PATCH 5/8] isdn: eicon: fix old-style declarations Arnd Bergmann
2016-06-17  5:06     ` David Miller
2016-06-16 13:52   ` [PATCH 6/8] net: gianfar: fix old-style declaration Arnd Bergmann
2016-06-16 18:02     ` Sergei Shtylyov
2016-06-16 18:11       ` Joe Perches
2016-06-17  5:06     ` David Miller
     [not found]   ` <20160616135245.3198419-1-arnd-r2nGTMty4D4@public.gmane.org>
2016-06-29 15:56     ` [1/8] wireless: airo: rename 'register' variable Kalle Valo
2016-06-16 13:57 ` [PATCH 8/8] sunrpc: fix old-style declaration Arnd Bergmann
2016-06-16 13:59 ` Arnd Bergmann [this message]
2016-06-17  5:06   ` [PATCH 7/8] net: xfrm: " David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12896147.Nph51CCL66@wuerfel \
    --to=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=dsa@cumulusnetworks.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=steffen.klassert@secunet.com \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).