netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 net-next] ipmr: change the prototype of ip_mr_forward().
@ 2013-07-20 12:09 Rami Rosen
  2013-07-20 20:21 ` Nicolas Dichtel
  2013-07-24  0:01 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Rami Rosen @ 2013-07-20 12:09 UTC (permalink / raw)
  To: davem; +Cc: nicolas.dichtel, netdev, Rami Rosen

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

The ip_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/ipv4/ipmr.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 132a096..bacc0bc 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -127,9 +127,9 @@ static struct kmem_cache *mrt_cachep __read_mostly;
 static struct mr_table *ipmr_new_table(struct net *net, u32 id);
 static void ipmr_free_table(struct mr_table *mrt);
 
-static int ip_mr_forward(struct net *net, struct mr_table *mrt,
-			 struct sk_buff *skb, struct mfc_cache *cache,
-			 int local);
+static void ip_mr_forward(struct net *net, struct mr_table *mrt,
+			  struct sk_buff *skb, struct mfc_cache *cache,
+			  int local);
 static int ipmr_cache_report(struct mr_table *mrt,
 			     struct sk_buff *pkt, vifi_t vifi, int assert);
 static int __ipmr_fill_mroute(struct mr_table *mrt, struct sk_buff *skb,
@@ -1795,9 +1795,9 @@ static int ipmr_find_vif(struct mr_table *mrt, struct net_device *dev)
 
 /* "local" means that we should preserve one skb (for local delivery) */
 
-static int ip_mr_forward(struct net *net, struct mr_table *mrt,
-			 struct sk_buff *skb, struct mfc_cache *cache,
-			 int local)
+static void ip_mr_forward(struct net *net, struct mr_table *mrt,
+			  struct sk_buff *skb, struct mfc_cache *cache,
+			  int local)
 {
 	int psend = -1;
 	int vif, ct;
@@ -1903,14 +1903,13 @@ last_forward:
 				ipmr_queue_xmit(net, mrt, skb2, cache, psend);
 		} else {
 			ipmr_queue_xmit(net, mrt, skb, cache, psend);
-			return 0;
+			return;
 		}
 	}
 
 dont_forward:
 	if (!local)
 		kfree_skb(skb);
-	return 0;
 }
 
 static struct mr_table *ipmr_rt_fib_lookup(struct net *net, struct sk_buff *skb)
-- 
1.8.1.4

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

* Re: [PATCH v3 net-next] ipmr: change the prototype of ip_mr_forward().
  2013-07-20 12:09 [PATCH v3 net-next] ipmr: change the prototype of ip_mr_forward() Rami Rosen
@ 2013-07-20 20:21 ` Nicolas Dichtel
  2013-07-20 20:25   ` Nicolas Dichtel
  2013-07-24  0:01 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Nicolas Dichtel @ 2013-07-20 20:21 UTC (permalink / raw)
  To: Rami Rosen; +Cc: davem, netdev

Le 20/07/2013 14:09, Rami Rosen a écrit :
> This patch changes the prototpye of the ip_mr_forward() method to return void
> instead of int.
>
> The ip_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/ipv4/ipmr.c | 15 +++++++--------
>   1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
> index 132a096..bacc0bc 100644
> --- a/net/ipv4/ipmr.c
> +++ b/net/ipv4/ipmr.c
> @@ -127,9 +127,9 @@ static struct kmem_cache *mrt_cachep __read_mostly;
>   static struct mr_table *ipmr_new_table(struct net *net, u32 id);
>   static void ipmr_free_table(struct mr_table *mrt);
>
> -static int ip_mr_forward(struct net *net, struct mr_table *mrt,
> -			 struct sk_buff *skb, struct mfc_cache *cache,
> -			 int local);
> +static void ip_mr_forward(struct net *net, struct mr_table *mrt,
> +			  struct sk_buff *skb, struct mfc_cache *cache,
> +			  int local);
>   static int ipmr_cache_report(struct mr_table *mrt,
>   			     struct sk_buff *pkt, vifi_t vifi, int assert);
>   static int __ipmr_fill_mroute(struct mr_table *mrt, struct sk_buff *skb,
> @@ -1795,9 +1795,9 @@ static int ipmr_find_vif(struct mr_table *mrt, struct net_device *dev)
>
>   /* "local" means that we should preserve one skb (for local delivery) */
>
> -static int ip_mr_forward(struct net *net, struct mr_table *mrt,
> -			 struct sk_buff *skb, struct mfc_cache *cache,
> -			 int local)
> +static void ip_mr_forward(struct net *net, struct mr_table *mrt,
> +			  struct sk_buff *skb, struct mfc_cache *cache,
> +			  int local)
>   {
>   	int psend = -1;
>   	int vif, ct;
> @@ -1903,14 +1903,13 @@ last_forward:
>   				ipmr_queue_xmit(net, mrt, skb2, cache, psend);
>   		} else {
>   			ipmr_queue_xmit(net, mrt, skb, cache, psend);
> -			return 0;
> +			return;
>   		}
>   	}
>
>   dont_forward:
>   	if (!local)
>   		kfree_skb(skb);
> -	return 0;
>   }
>
>   static struct mr_table *ipmr_rt_fib_lookup(struct net *net, struct sk_buff *skb)
>

-- 
Nicolas DICHTEL
6WIND
R&D Engineer

Tel: +33 1 39 30 92 41
Fax: +33 1 39 30 92 11
nicolas.dichtel@6wind.com
www.6wind.com
www.6windblog.com
Twitter: http://twitter.com/6windsoftware

Ce courriel ainsi que toutes les pièces jointes, est uniquement destiné à son ou 
ses destinataires. Il contient des informations confidentielles qui sont la 
propriété de 6WIND. Toute révélation, distribution ou copie des informations 
qu'il contient est strictement interdite. Si vous avez reçu ce message par 
erreur, veuillez immédiatement le signaler à l'émetteur et détruire toutes les 
données reçues.

This e-mail message, including any attachments, is for the sole use of the 
intended recipient(s) and contains information that is confidential and 
proprietary to 6WIND. All unauthorized review, use, disclosure or distribution 
is prohibited. If you are not the intended recipient, please contact the sender 
by reply e-mail and destroy all copies of the original message.

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

* Re: [PATCH v3 net-next] ipmr: change the prototype of ip_mr_forward().
  2013-07-20 20:21 ` Nicolas Dichtel
@ 2013-07-20 20:25   ` Nicolas Dichtel
  0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Dichtel @ 2013-07-20 20:25 UTC (permalink / raw)
  To: Rami Rosen, davem; +Cc: netdev

Sorry for the disclaimer in the previous email. I forget to remove it.
Please, ignore it.


Thank you,
Nicolas

Le 20/07/2013 22:21, Nicolas Dichtel a écrit :
> Le 20/07/2013 14:09, Rami Rosen a écrit :
>> This patch changes the prototpye of the ip_mr_forward() method to return void
>> instead of int.
>>
>> The ip_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/ipv4/ipmr.c | 15 +++++++--------
>>   1 file changed, 7 insertions(+), 8 deletions(-)
>>
>> diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
>> index 132a096..bacc0bc 100644
>> --- a/net/ipv4/ipmr.c
>> +++ b/net/ipv4/ipmr.c
>> @@ -127,9 +127,9 @@ static struct kmem_cache *mrt_cachep __read_mostly;
>>   static struct mr_table *ipmr_new_table(struct net *net, u32 id);
>>   static void ipmr_free_table(struct mr_table *mrt);
>>
>> -static int ip_mr_forward(struct net *net, struct mr_table *mrt,
>> -             struct sk_buff *skb, struct mfc_cache *cache,
>> -             int local);
>> +static void ip_mr_forward(struct net *net, struct mr_table *mrt,
>> +              struct sk_buff *skb, struct mfc_cache *cache,
>> +              int local);
>>   static int ipmr_cache_report(struct mr_table *mrt,
>>                    struct sk_buff *pkt, vifi_t vifi, int assert);
>>   static int __ipmr_fill_mroute(struct mr_table *mrt, struct sk_buff *skb,
>> @@ -1795,9 +1795,9 @@ static int ipmr_find_vif(struct mr_table *mrt, struct
>> net_device *dev)
>>
>>   /* "local" means that we should preserve one skb (for local delivery) */
>>
>> -static int ip_mr_forward(struct net *net, struct mr_table *mrt,
>> -             struct sk_buff *skb, struct mfc_cache *cache,
>> -             int local)
>> +static void ip_mr_forward(struct net *net, struct mr_table *mrt,
>> +              struct sk_buff *skb, struct mfc_cache *cache,
>> +              int local)
>>   {
>>       int psend = -1;
>>       int vif, ct;
>> @@ -1903,14 +1903,13 @@ last_forward:
>>                   ipmr_queue_xmit(net, mrt, skb2, cache, psend);
>>           } else {
>>               ipmr_queue_xmit(net, mrt, skb, cache, psend);
>> -            return 0;
>> +            return;
>>           }
>>       }
>>
>>   dont_forward:
>>       if (!local)
>>           kfree_skb(skb);
>> -    return 0;
>>   }
>>
>>   static struct mr_table *ipmr_rt_fib_lookup(struct net *net, struct sk_buff
>> *skb)
>>
>

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

* Re: [PATCH v3 net-next] ipmr: change the prototype of ip_mr_forward().
  2013-07-20 12:09 [PATCH v3 net-next] ipmr: change the prototype of ip_mr_forward() Rami Rosen
  2013-07-20 20:21 ` Nicolas Dichtel
@ 2013-07-24  0:01 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2013-07-24  0:01 UTC (permalink / raw)
  To: ramirose; +Cc: nicolas.dichtel, netdev

From: Rami Rosen <ramirose@gmail.com>
Date: Sat, 20 Jul 2013 15:09:28 +0300

> This patch changes the prototpye of the ip_mr_forward() method to return void
> instead of int.
> 
> The ip_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>

Applied, thanks.

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-20 12:09 [PATCH v3 net-next] ipmr: change the prototype of ip_mr_forward() Rami Rosen
2013-07-20 20:21 ` Nicolas Dichtel
2013-07-20 20:25   ` Nicolas Dichtel
2013-07-24  0:01 ` 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).