netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ip6mr: change the prototype of ip6_mr_forward().
@ 2013-07-21  0:00 Rami Rosen
  2013-07-22 20:47 ` Nicolas Dichtel
  0 siblings, 1 reply; 3+ messages in thread
From: Rami Rosen @ 2013-07-21  0:00 UTC (permalink / raw)
  To: davem; +Cc: nicolas.dichtel, yoshfuji, netdev, Rami Rosen

This patch changes the prototpye of the ip6_mr_forward() method to return void
instead of int.

The ip6_mr_forward() method always returns 0; moreover, the return value of this
method is not checked anywhere.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
---
 net/ipv6/ip6mr.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 583e8d4..6d78615 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -110,8 +110,8 @@ static struct kmem_cache *mrt_cachep __read_mostly;
 static struct mr6_table *ip6mr_new_table(struct net *net, u32 id);
 static void ip6mr_free_table(struct mr6_table *mrt);
 
-static int ip6_mr_forward(struct net *net, struct mr6_table *mrt,
-			  struct sk_buff *skb, struct mfc6_cache *cache);
+static void ip6_mr_forward(struct net *net, struct mr6_table *mrt,
+			   struct sk_buff *skb, struct mfc6_cache *cache);
 static int ip6mr_cache_report(struct mr6_table *mrt, struct sk_buff *pkt,
 			      mifi_t mifi, int assert);
 static int __ip6mr_fill_mroute(struct mr6_table *mrt, struct sk_buff *skb,
@@ -2069,8 +2069,8 @@ static int ip6mr_find_vif(struct mr6_table *mrt, struct net_device *dev)
 	return ct;
 }
 
-static int ip6_mr_forward(struct net *net, struct mr6_table *mrt,
-			  struct sk_buff *skb, struct mfc6_cache *cache)
+static void ip6_mr_forward(struct net *net, struct mr6_table *mrt,
+			   struct sk_buff *skb, struct mfc6_cache *cache)
 {
 	int psend = -1;
 	int vif, ct;
@@ -2151,12 +2151,11 @@ forward:
 last_forward:
 	if (psend != -1) {
 		ip6mr_forward2(net, mrt, skb, cache, psend);
-		return 0;
+		return;
 	}
 
 dont_forward:
 	kfree_skb(skb);
-	return 0;
 }
 
 
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] ip6mr: change the prototype of ip6_mr_forward().
  2013-07-21  0:00 [PATCH net-next] ip6mr: change the prototype of ip6_mr_forward() Rami Rosen
@ 2013-07-22 20:47 ` Nicolas Dichtel
  2013-07-24  0:21   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Dichtel @ 2013-07-22 20:47 UTC (permalink / raw)
  To: Rami Rosen; +Cc: davem, yoshfuji, netdev

Le 21/07/2013 02:00, Rami Rosen a écrit :
> This patch changes the prototpye of the ip6_mr_forward() method to return void
> instead of int.
>
> The ip6_mr_forward() method always returns 0; moreover, the return value of this
> method is not checked anywhere.
>
> Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

> ---
>   net/ipv6/ip6mr.c | 11 +++++------
>   1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
> index 583e8d4..6d78615 100644
> --- a/net/ipv6/ip6mr.c
> +++ b/net/ipv6/ip6mr.c
> @@ -110,8 +110,8 @@ static struct kmem_cache *mrt_cachep __read_mostly;
>   static struct mr6_table *ip6mr_new_table(struct net *net, u32 id);
>   static void ip6mr_free_table(struct mr6_table *mrt);
>
> -static int ip6_mr_forward(struct net *net, struct mr6_table *mrt,
> -			  struct sk_buff *skb, struct mfc6_cache *cache);
> +static void ip6_mr_forward(struct net *net, struct mr6_table *mrt,
> +			   struct sk_buff *skb, struct mfc6_cache *cache);
>   static int ip6mr_cache_report(struct mr6_table *mrt, struct sk_buff *pkt,
>   			      mifi_t mifi, int assert);
>   static int __ip6mr_fill_mroute(struct mr6_table *mrt, struct sk_buff *skb,
> @@ -2069,8 +2069,8 @@ static int ip6mr_find_vif(struct mr6_table *mrt, struct net_device *dev)
>   	return ct;
>   }
>
> -static int ip6_mr_forward(struct net *net, struct mr6_table *mrt,
> -			  struct sk_buff *skb, struct mfc6_cache *cache)
> +static void ip6_mr_forward(struct net *net, struct mr6_table *mrt,
> +			   struct sk_buff *skb, struct mfc6_cache *cache)
>   {
>   	int psend = -1;
>   	int vif, ct;
> @@ -2151,12 +2151,11 @@ forward:
>   last_forward:
>   	if (psend != -1) {
>   		ip6mr_forward2(net, mrt, skb, cache, psend);
> -		return 0;
> +		return;
>   	}
>
>   dont_forward:
>   	kfree_skb(skb);
> -	return 0;
>   }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] ip6mr: change the prototype of ip6_mr_forward().
  2013-07-22 20:47 ` Nicolas Dichtel
@ 2013-07-24  0:21   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2013-07-24  0:21 UTC (permalink / raw)
  To: nicolas.dichtel; +Cc: ramirose, yoshfuji, netdev

From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Mon, 22 Jul 2013 22:47:54 +0200

> Le 21/07/2013 02:00, Rami Rosen a écrit :
>> This patch changes the prototpye of the ip6_mr_forward() method to
>> return void
>> instead of int.
>>
>> The ip6_mr_forward() method always returns 0; moreover, the return
>> value of this
>> method is not checked anywhere.
>>
>> Signed-off-by: Rami Rosen <ramirose@gmail.com>
> Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-24  0:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-21  0:00 [PATCH net-next] ip6mr: change the prototype of ip6_mr_forward() Rami Rosen
2013-07-22 20:47 ` Nicolas Dichtel
2013-07-24  0:21   ` 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).