From: Fan Du <fan.du@windriver.com>
To: Steffen Klassert <steffen.klassert@secunet.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>
Subject: Re: [PATCH] XFRM: remove redundant parameter "int dir" in struct xfrm_mgr.acquire
Date: Mon, 13 Aug 2012 15:23:09 +0800 [thread overview]
Message-ID: <5028AB5D.9040200@windriver.com> (raw)
In-Reply-To: <20120813070841.GP1869@secunet.com>
On 2012年08月13日 15:08, Steffen Klassert wrote:
> On Mon, Aug 13, 2012 at 02:25:57PM +0800, Fan Du wrote:
>>
>> static int xfrm_send_acquire(struct xfrm_state *x, struct xfrm_tmpl *xt,
>> - struct xfrm_policy *xp, int dir)
>> + struct xfrm_policy *xp)
>> {
>> struct net *net = xs_net(x);
>> struct sk_buff *skb;
>> @@ -2614,7 +2614,7 @@ static int xfrm_send_acquire(struct xfrm_state *x, struct xfrm_tmpl *xt,
>> if (skb == NULL)
>> return -ENOMEM;
>>
>> - if (build_acquire(skb, x, xt, xp, dir)< 0)
>> + if (build_acquire(skb, x, xt, xp, XFRM_POLICY_OUT)< 0)
>> BUG();
>
> xfrm_send_acquire() is the only caller of build_acquire().
> So if you remove the dir parameter from xfrm_send_acquire(),
> you can remove it from build_acquire() too.
>
Yep, looks like we can only remove "dir" at build_acquire, not into
copy_to_user_policy anymore :)
I will adopt your approach in v2 if Dave say *YES* about this patch.
thanks anyway.
--
Love each day!
--fan
next prev parent reply other threads:[~2012-08-13 7:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-13 6:25 [PATCH] XFRM: remove redundant parameter "int dir" in struct xfrm_mgr.acquire Fan Du
2012-08-13 7:08 ` Steffen Klassert
2012-08-13 7:23 ` Fan Du [this message]
2012-08-14 21:56 ` 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=5028AB5D.9040200@windriver.com \
--to=fan.du@windriver.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=steffen.klassert@secunet.com \
/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).