From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754112AbdARMvC (ORCPT ); Wed, 18 Jan 2017 07:51:02 -0500 Received: from vps0.lunn.ch ([178.209.37.122]:36902 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754078AbdARMu7 (ORCPT ); Wed, 18 Jan 2017 07:50:59 -0500 Date: Wed, 18 Jan 2017 13:50:57 +0100 From: Andrew Lunn To: Vivien Didelot Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Florian Fainelli Subject: Re: [PATCH net-next 2/2] net: dsa: use cpu_switch instead of ds[0] Message-ID: <20170118125057.GB7690@lunn.ch> References: <20170118014139.31417-1-vivien.didelot@savoirfairelinux.com> <20170118014139.31417-2-vivien.didelot@savoirfairelinux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170118014139.31417-2-vivien.didelot@savoirfairelinux.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 On Tue, Jan 17, 2017 at 08:41:39PM -0500, Vivien Didelot wrote: > Now that the DSA Ethernet switches are true Linux devices, the CPU > switch is not necessarily the first one. If its address is higher than > the second switch on the same MDIO bus, its index will be 1, not 0. > > Avoid any confusion by using dst->cpu_switch instead of dst->ds[0]. > > Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Andrew