From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vivien Didelot Subject: Re: [PATCH net-next 3/7] net: dsa: get port type at parse time Date: Mon, 30 Oct 2017 14:46:25 -0400 Message-ID: <87she079tq.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me> References: <20171027195519.5931-1-vivien.didelot@savoirfairelinux.com> <20171027195519.5931-4-vivien.didelot@savoirfairelinux.com> Mime-Version: 1.0 Content-Type: text/plain Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Andrew Lunn To: Florian Fainelli , netdev@vger.kernel.org Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Hi Florian, Florian Fainelli writes: > Reviewed-by: Florian Fainelli > > One nit below: > >> static int dsa_port_parse_of(struct dsa_port *dp, struct device_node *dn) >> { >> + struct device_node *ethernet = of_parse_phandle(dn, "ethernet", 0); >> + struct device_node *link = of_parse_phandle(dn, "link", 0); >> + >> + if (ethernet) { >> + dp->type = DSA_PORT_TYPE_CPU; >> + } else if (link) { >> + dp->type = DSA_PORT_TYPE_DSA; >> + } else { >> + dp->type = DSA_PORT_TYPE_USER; >> + } >> + > > The curly braces are probably not necessary since all of these are > single line statements. I didn't mention it in the commit message because it was obvious that the next patches will extend these condition arms. Thanks, Vivien