From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932477AbcFNVR0 (ORCPT ); Tue, 14 Jun 2016 17:17:26 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:46084 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932121AbcFNVRY (ORCPT ); Tue, 14 Jun 2016 17:17:24 -0400 Date: Tue, 14 Jun 2016 23:17:22 +0200 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 v2 net-next v2 05/12] net: dsa: mv88e6xxx: add switch register helpers Message-ID: <20160614211722.GE12832@lunn.ch> References: <20160614183153.32327-1-vivien.didelot@savoirfairelinux.com> <20160614183153.32327-6-vivien.didelot@savoirfairelinux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160614183153.32327-6-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, Jun 14, 2016 at 02:31:46PM -0400, Vivien Didelot wrote: > The mixed assignments, allocations and registrations in the probe code > make it hard to follow the logic and figure out what is DSA or chip > specific. > > Extract the struct dsa_switch related code in a simple > mv88e6xxx_register_switch helper function. > > For symmetry in the code, add a mv88e6xxx_unregister_switch function. > > Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn Andrew