* [PATCH net-next] net: xfrm: xfrm_policy: fix inline not at beginning of declaration
@ 2014-01-07 22:20 Daniel Borkmann
2014-01-07 23:34 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Borkmann @ 2014-01-07 22:20 UTC (permalink / raw)
To: davem; +Cc: netdev
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.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
---
net/xfrm/xfrm_policy.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index a7487f3..b390446 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -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;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: xfrm: xfrm_policy: fix inline not at beginning of declaration
2014-01-07 22:20 [PATCH net-next] net: xfrm: xfrm_policy: fix inline not at beginning of declaration Daniel Borkmann
@ 2014-01-07 23:34 ` David Miller
2014-01-08 5:55 ` Steffen Klassert
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2014-01-07 23:34 UTC (permalink / raw)
To: dborkman; +Cc: netdev
From: Daniel Borkmann <dborkman@redhat.com>
Date: Tue, 7 Jan 2014 23:20:27 +0100
> 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.
>
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: xfrm: xfrm_policy: fix inline not at beginning of declaration
2014-01-07 23:34 ` David Miller
@ 2014-01-08 5:55 ` Steffen Klassert
2014-01-08 5:57 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Steffen Klassert @ 2014-01-08 5:55 UTC (permalink / raw)
To: David Miller; +Cc: dborkman, netdev
On Tue, Jan 07, 2014 at 06:34:12PM -0500, David Miller wrote:
> From: Daniel Borkmann <dborkman@redhat.com>
> Date: Tue, 7 Jan 2014 23:20:27 +0100
>
> > 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.
> >
> > Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
>
> Applied.
I have a fix for this warnings in the ipsec-next tree too:
commit 2f3ea9a95c58fd0e4bed18a9c9dfe53739fee3b2
Author: Weilong Chen <chenweilong@huawei.com>
Date: Tue Dec 24 09:43:50 2013 +0800
xfrm: checkpatch erros with inline keyword position
Signed-off-by: Weilong Chen <chenweilong@huawei.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Should I revert it, or do you want to solve the conflict when
I send the ipsec-next pull request?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net: xfrm: xfrm_policy: fix inline not at beginning of declaration
2014-01-08 5:55 ` Steffen Klassert
@ 2014-01-08 5:57 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2014-01-08 5:57 UTC (permalink / raw)
To: steffen.klassert; +Cc: dborkman, netdev
From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Wed, 8 Jan 2014 06:55:36 +0100
> On Tue, Jan 07, 2014 at 06:34:12PM -0500, David Miller wrote:
>> From: Daniel Borkmann <dborkman@redhat.com>
>> Date: Tue, 7 Jan 2014 23:20:27 +0100
>>
>> > 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.
>> >
>> > Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
>>
>> Applied.
>
> I have a fix for this warnings in the ipsec-next tree too:
>
> commit 2f3ea9a95c58fd0e4bed18a9c9dfe53739fee3b2
> Author: Weilong Chen <chenweilong@huawei.com>
> Date: Tue Dec 24 09:43:50 2013 +0800
>
> xfrm: checkpatch erros with inline keyword position
>
> Signed-off-by: Weilong Chen <chenweilong@huawei.com>
> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
>
>
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-08 5:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-07 22:20 [PATCH net-next] net: xfrm: xfrm_policy: fix inline not at beginning of declaration Daniel Borkmann
2014-01-07 23:34 ` David Miller
2014-01-08 5:55 ` Steffen Klassert
2014-01-08 5:57 ` David Miller
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).