Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1627862 > unrolled thread

[PATCH net-next] net: dsa: Remove redundant NULL dst check

Started byFlorian Fainelli <f.fainelli@gmail.com>
First post2017-04-21 00:50 +0200
Last post2017-04-21 19:10 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH net-next] net: dsa: Remove redundant NULL dst check Florian Fainelli <f.fainelli@gmail.com> - 2017-04-21 00:50 +0200
    Re: [PATCH net-next] net: dsa: Remove redundant NULL dst check Juergen Borleis <jbe@pengutronix.de> - 2017-04-21 09:40 +0200
    Re: [PATCH net-next] net: dsa: Remove redundant NULL dst check David Miller <davem@davemloft.net> - 2017-04-21 19:10 +0200

#1627862 — [PATCH net-next] net: dsa: Remove redundant NULL dst check

FromFlorian Fainelli <f.fainelli@gmail.com>
Date2017-04-21 00:50 +0200
Subject[PATCH net-next] net: dsa: Remove redundant NULL dst check
Message-ID<tyt3H-6m1-3@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1628006

FromJuergen Borleis <jbe@pengutronix.de>
Date2017-04-21 09:40 +0200
Message-ID<tyBkB-32k-5@gated-at.bofh.it>
In reply to#1627862
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/  |

[toc] | [prev] | [next] | [standalone]


#1628364

FromDavid Miller <davem@davemloft.net>
Date2017-04-21 19:10 +0200
Message-ID<tyKee-8vc-17@gated-at.bofh.it>
In reply to#1627862
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.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web