From mboxrd@z Thu Jan 1 00:00:00 1970 From: andrew@lunn.ch (Andrew Lunn) Date: Fri, 13 Jan 2017 15:04:59 +0100 Subject: [PATCH net-next v2 08/10] net: dsa: Add support for platform data In-Reply-To: <20170112034121.27697-9-f.fainelli@gmail.com> References: <20170112034121.27697-1-f.fainelli@gmail.com> <20170112034121.27697-9-f.fainelli@gmail.com> Message-ID: <20170113140459.GH10203@lunn.ch> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org > index cd91070b5467..d326fc4afad7 100644 > --- a/net/dsa/dsa2.c > +++ b/net/dsa/dsa2.c > @@ -81,17 +81,23 @@ static void dsa_dst_del_ds(struct dsa_switch_tree *dst, > > static bool dsa_port_is_valid(struct dsa_port *port) > { > - return !!port->dn; > + return !!(port->dn || port->name); > } Does this clash with Viviens recent change to make names optional and have the kernel assign it? I suppose you could use an name of "eth%d"? Is it worth adding a comment to the platform data structure? Andrew From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751735AbdAMOFO (ORCPT ); Fri, 13 Jan 2017 09:05:14 -0500 Received: from vps0.lunn.ch ([178.209.37.122]:59439 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751524AbdAMOFN (ORCPT ); Fri, 13 Jan 2017 09:05:13 -0500 Date: Fri, 13 Jan 2017 15:04:59 +0100 From: Andrew Lunn To: Florian Fainelli Cc: netdev@vger.kernel.org, Jason Cooper , Sebastian Hesselbarth , Gregory Clement , Russell King , Vivien Didelot , "David S. Miller" , "moderated list:ARM SUB-ARCHITECTURES" , open list , gregkh@linuxfoundation.org Subject: Re: [PATCH net-next v2 08/10] net: dsa: Add support for platform data Message-ID: <20170113140459.GH10203@lunn.ch> References: <20170112034121.27697-1-f.fainelli@gmail.com> <20170112034121.27697-9-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170112034121.27697-9-f.fainelli@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > index cd91070b5467..d326fc4afad7 100644 > --- a/net/dsa/dsa2.c > +++ b/net/dsa/dsa2.c > @@ -81,17 +81,23 @@ static void dsa_dst_del_ds(struct dsa_switch_tree *dst, > > static bool dsa_port_is_valid(struct dsa_port *port) > { > - return !!port->dn; > + return !!(port->dn || port->name); > } Does this clash with Viviens recent change to make names optional and have the kernel assign it? I suppose you could use an name of "eth%d"? Is it worth adding a comment to the platform data structure? Andrew