linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: dsa: Remove redundant NULL dst check
@ 2017-04-20 22:47 Florian Fainelli
  2017-04-21  7:29 ` Juergen Borleis
  2017-04-21 14:41 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Florian Fainelli @ 2017-04-20 22:47 UTC (permalink / raw)
  To: netdev
  Cc: jbe, Florian Fainelli, Andrew Lunn, Vivien Didelot,
	David S. Miller, open list

tag_lan9303.c does check for a NULL dst but that's already checked by
dsa_switch_rcv() one layer above.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 net/dsa/tag_lan9303.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/net/dsa/tag_lan9303.c b/net/dsa/tag_lan9303.c
index 563b6c8fe445..70130ed5c21a 100644
--- a/net/dsa/tag_lan9303.c
+++ b/net/dsa/tag_lan9303.c
@@ -79,11 +79,6 @@ static struct sk_buff *lan9303_rcv(struct sk_buff *skb, struct net_device *dev,
 	struct dsa_switch *ds;
 	unsigned int source_port;
 
-	if (unlikely(!dst)) {
-		dev_warn_ratelimited(&dev->dev, "Dropping packet, due to missing switch tree device\n");
-		return NULL;
-	}
-
 	ds = dst->ds[0];
 
 	if (unlikely(!ds)) {
-- 
2.9.3

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

* Re: [PATCH net-next] net: dsa: Remove redundant NULL dst check
  2017-04-20 22:47 [PATCH net-next] net: dsa: Remove redundant NULL dst check Florian Fainelli
@ 2017-04-21  7:29 ` Juergen Borleis
  2017-04-21 14:41 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Juergen Borleis @ 2017-04-21  7:29 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: netdev, Andrew Lunn, Vivien Didelot, David S. Miller, open list

Hi Florian,

On Friday 21 April 2017 00:47:22 Florian Fainelli wrote:
> tag_lan9303.c does check for a NULL dst but that's already checked by
> dsa_switch_rcv() one layer above.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>  net/dsa/tag_lan9303.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/net/dsa/tag_lan9303.c b/net/dsa/tag_lan9303.c
> index 563b6c8fe445..70130ed5c21a 100644
> --- a/net/dsa/tag_lan9303.c
> +++ b/net/dsa/tag_lan9303.c
> @@ -79,11 +79,6 @@ static struct sk_buff *lan9303_rcv(struct sk_buff
> *skb, struct net_device *dev, struct dsa_switch *ds;
>  	unsigned int source_port;
>
> -	if (unlikely(!dst)) {
> -		dev_warn_ratelimited(&dev->dev, "Dropping packet, due to missing switch tree device\n");
> -		return NULL; 
> -	}
> -
>  	ds = dst->ds[0];
>
>  	if (unlikely(!ds)) {

Thanks!

Acked-by: Juergen Borleis <jbe@pengutronix.de>

-- 
Pengutronix e.K.                             | Juergen Borleis             |
Industrial Linux Solutions                   | http://www.pengutronix.de/  |

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

* Re: [PATCH net-next] net: dsa: Remove redundant NULL dst check
  2017-04-20 22:47 [PATCH net-next] net: dsa: Remove redundant NULL dst check Florian Fainelli
  2017-04-21  7:29 ` Juergen Borleis
@ 2017-04-21 14:41 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-04-21 14:41 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev, jbe, andrew, vivien.didelot, linux-kernel

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Thu, 20 Apr 2017 15:47:22 -0700

> tag_lan9303.c does check for a NULL dst but that's already checked by
> dsa_switch_rcv() one layer above.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Applied, thank you.

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

end of thread, other threads:[~2017-04-21 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-20 22:47 [PATCH net-next] net: dsa: Remove redundant NULL dst check Florian Fainelli
2017-04-21  7:29 ` Juergen Borleis
2017-04-21 14:41 ` 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).