Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752533AbdI2TIi (ORCPT ); Fri, 29 Sep 2017 15:08:38 -0400 Received: from mail.savoirfairelinux.com ([208.88.110.44]:60180 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752303AbdI2TIg (ORCPT ); Fri, 29 Sep 2017 15:08:36 -0400 From: Vivien Didelot To: Florian Fainelli , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Andrew Lunn Subject: Re: [PATCH net-next 2/8] net: dsa: directly fetch switch in lan9303_rcv In-Reply-To: References: <20170929183635.8122-1-vivien.didelot@savoirfairelinux.com> <20170929183635.8122-3-vivien.didelot@savoirfairelinux.com> Date: Fri, 29 Sep 2017 15:04:56 -0400 Message-ID: <87lgkxl413.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 756 Lines: 28 Hi Florian, Florian Fainelli writes: >> @@ -72,11 +72,10 @@ static struct sk_buff *lan9303_rcv(struct sk_buff *skb, struct net_device *dev, >> { >> u16 *lan9303_tag; >> struct dsa_switch_tree *dst = dev->dsa_ptr; >> - struct dsa_switch *ds; >> + struct dsa_port *cpu_dp = dst->cpu_dp; >> + struct dsa_switch *ds = cpu_dp->ds; >> unsigned int source_port; >> >> - ds = dst->ds[0]; >> - >> if (unlikely(!ds)) { >> dev_warn_ratelimited(&dev->dev, "Dropping packet, due to missing DSA switch device\n"); >> return NULL; > > Similarly to the patch before, you can probably drop this test, I don't > actually see how we could trigger it. Good catch, I'll respin after eventually more reviews. Thanks, Vivien