Skip to contentSkip to conversation

net: xfrm: xfrm_policy: fix inline not at beginning of declaration

PATCH Applied Daniel Borkmann 3 participants 4 messages Jan 7, 2014 – Jan 8, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: xfrm: xfrm_policy: fix inline not at beginning of declaration

Fix three warnings related to:

net/xfrm/xfrm_policy.c:1644:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] net/xfrm/xfrm_policy.c:1656:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] net/xfrm/xfrm_policy.c:1668:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]

Just removing the inline keyword is sufficient as the compiler will decide on its own about inlining or not.

---
 net/xfrm/xfrm_policy.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
net/xfrm/xfrm_policy.c +6 -6
index a7487f3..b390446 100644
@@ -1641,20 +1641,20 @@ free_dst:
 	goto out;
 }
 
-static int inline
-xfrm_dst_alloc_copy(void **target, const void *src, int size)
+static int xfrm_dst_alloc_copy(void **target, const void *src, int size)
 {
 	if (!*target) {
 		*target = kmalloc(size, GFP_ATOMIC);
 		if (!*target)
 			return -ENOMEM;
 	}
+
 	memcpy(*target, src, size);
 	return 0;
 }
 
-static int inline
-xfrm_dst_update_parent(struct dst_entry *dst, const struct xfrm_selector *sel)
+static int xfrm_dst_update_parent(struct dst_entry *dst,
+				  const struct xfrm_selector *sel)
 {
 #ifdef CONFIG_XFRM_SUB_POLICY
 	struct xfrm_dst *xdst = (struct xfrm_dst *)dst;
@@ -1665,8 +1665,8 @@ xfrm_dst_update_parent(struct dst_entry *dst, const struct xfrm_selector *sel)
 #endif
 }
 
-static int inline
-xfrm_dst_update_origin(struct dst_entry *dst, const struct flowi *fl)
+static int xfrm_dst_update_origin(struct dst_entry *dst,
+				  const struct flowi *fl)
 {
 #ifdef CONFIG_XFRM_SUB_POLICY
 	struct xfrm_dst *xdst = (struct xfrm_dst *)dst;
Signature · 1 line
1.7.11.7
maintainer Applied
#1 lore raw

From: Daniel Borkmann <[email protected]>
Date: Tue, 7 Jan 2014 23:20:27 +0100

Quoted 10 lines

Fix three warnings related to:

net/xfrm/xfrm_policy.c:1644:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] net/xfrm/xfrm_policy.c:1656:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] net/xfrm/xfrm_policy.c:1668:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]

Just removing the inline keyword is sufficient as the compiler will decide on its own about inlining or not.

Applied.

maintainer
#2 lore raw
Quoted 9 lines · David Miller

From: Daniel Borkmann <[email protected]>
Date: Tue, 7 Jan 2014 23:20:27 +0100

Quoted 6 lines

Fix three warnings related to:

net/xfrm/xfrm_policy.c:1644:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] net/xfrm/xfrm_policy.c:1656:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] net/xfrm/xfrm_policy.c:1668:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]

Quoted 6 lines
Quoted 4 lines

Just removing the inline keyword is sufficient as the compiler will decide on its own about inlining or not.

Applied.

I have a fix for this warnings in the ipsec-next tree too:

commit 2f3ea9a95c58fd0e4bed18a9c9dfe53739fee3b2

Author: Weilong Chen <[email protected]>
Date:   Tue Dec 24 09:43:50 2013 +0800

xfrm: checkpatch erros with inline keyword position

Should I revert it, or do you want to solve the conflict when I send the ipsec-next pull request?

maintainer
#3 lore raw

From: Steffen Klassert <[email protected]>
Date: Wed, 8 Jan 2014 06:55:36 +0100

Quoted 23 lines · David Miller
Quoted 9 lines

From: Daniel Borkmann <[email protected]>
Date: Tue, 7 Jan 2014 23:20:27 +0100

Quoted 6 lines

Fix three warnings related to:

net/xfrm/xfrm_policy.c:1644:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] net/xfrm/xfrm_policy.c:1656:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] net/xfrm/xfrm_policy.c:1668:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]

Quoted 6 lines
Quoted 4 lines

Just removing the inline keyword is sufficient as the compiler will decide on its own about inlining or not.

Applied.

I have a fix for this warnings in the ipsec-next tree too:

commit 2f3ea9a95c58fd0e4bed18a9c9dfe53739fee3b2

Author: Weilong Chen <[email protected]>
Date:   Tue Dec 24 09:43:50 2013 +0800
Quoted 8 lines

xfrm: checkpatch erros with inline keyword position

Should I revert it, or do you want to solve the conflict when I send the ipsec-next pull request?

Just leave it alone, I'll take care of it at the next merge.