From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751764AbcFIMx7 (ORCPT ); Thu, 9 Jun 2016 08:53:59 -0400 Received: from mail.savoirfairelinux.com ([208.88.110.44]:33879 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751169AbcFIMx5 (ORCPT ); Thu, 9 Jun 2016 08:53:57 -0400 From: Vivien Didelot To: Andrew Lunn Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Florian Fainelli Subject: Re: [PATCH net-next 5/8] net: dsa: mv88e6xxx: add switch register helpers In-Reply-To: <20160609023934.GK2227@lunn.ch> References: <20160609004456.5441-1-vivien.didelot@savoirfairelinux.com> <20160609004456.5441-6-vivien.didelot@savoirfairelinux.com> <20160609023934.GK2227@lunn.ch> User-Agent: Notmuch/0.22 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-unknown-linux-gnu) Date: Thu, 09 Jun 2016 08:53:53 -0400 Message-ID: <878tyewmji.fsf@ketchup.mtl.sfl> 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 Andrew Lunn writes: > On Wed, Jun 08, 2016 at 08:44:53PM -0400, Vivien Didelot wrote: >> Extract the allocation and registration code related to the dsa_switch >> structure in a mv88e6xxx_register_switch helper function. >> >> For symmetry in the code, add a mv88e6xxx_unregister_switch function. > > You say what you are doing, but not why? The mixed assignements and registrations in the probe code make it hard to read and figure out what is dsa or chip specific, so I made that change to provide a simple function doing one thing, make it easier to follow the probe logic. Thanks, I'll update the commit message. Vivien