netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next-2.6] can: use correct NET_RX_ return values
@ 2009-08-29 16:45 Oliver Hartkopp
  2009-08-31  5:13 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Hartkopp @ 2009-08-29 16:45 UTC (permalink / raw)
  To: David Miller; +Cc: Linux Netdev List

[-- Attachment #1: Type: text/plain, Size: 197 bytes --]

Dropped skb's should be documented by an appropriate return value.
Use the correct NET_RX_DROP and NET_RX_SUCCESS values for that reason.

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>

---

[-- Attachment #2: can_use_correct_NET_RX_return_values.patch --]
[-- Type: text/x-patch, Size: 354 bytes --]

diff --git a/net/can/af_can.c b/net/can/af_can.c
index f9c027b..ef1c43a 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -686,11 +686,11 @@ static int can_rcv(struct sk_buff *skb, struct net_device *dev,
 		can_stats.matches_delta++;
 	}
 
-	return 0;
+	return NET_RX_SUCCESS;
 
 drop:
 	kfree_skb(skb);
-	return 0;
+	return NET_RX_DROP;
 }
 
 /*

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

* Re: [PATCH net-next-2.6] can: use correct NET_RX_ return values
  2009-08-29 16:45 [PATCH net-next-2.6] can: use correct NET_RX_ return values Oliver Hartkopp
@ 2009-08-31  5:13 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-08-31  5:13 UTC (permalink / raw)
  To: oliver; +Cc: netdev

From: Oliver Hartkopp <oliver@hartkopp.net>
Date: Sat, 29 Aug 2009 18:45:09 +0200

> Dropped skb's should be documented by an appropriate return value.
> Use the correct NET_RX_DROP and NET_RX_SUCCESS values for that reason.
> 
> Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>

Applied, thanks.

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

end of thread, other threads:[~2009-08-31  5:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-29 16:45 [PATCH net-next-2.6] can: use correct NET_RX_ return values Oliver Hartkopp
2009-08-31  5:13 ` 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).