Thread (4 messages) flat view 4 messages, 3 authors, 2012-08-14

Re: [PATCH] XFRM: remove redundant parameter "int dir" in struct xfrm_mgr.acquire

From: Steffen Klassert <steffen.klassert@secunet.com>
Date: 2012-08-13 07:08:44

On Mon, Aug 13, 2012 at 02:25:57PM +0800, Fan Du wrote:
quoted hunk ↗ jump to hunk
 
 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. 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help