Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753309AbdCMOx0 (ORCPT ); Mon, 13 Mar 2017 10:53:26 -0400 Received: from mail.savoirfairelinux.com ([208.88.110.44]:54064 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750820AbdCMOxS (ORCPT ); Mon, 13 Mar 2017 10:53:18 -0400 From: Vivien Didelot To: Florian Fainelli , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Andrew Lunn Subject: Re: [PATCH net-next v2 00/17] net: dsa: mv88e6xxx: rework ATU support In-Reply-To: References: <20170311211303.24560-1-vivien.didelot@savoirfairelinux.com> Date: Mon, 13 Mar 2017 10:52:10 -0400 Message-ID: <874lyxp6ud.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me> 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 Content-Length: 661 Lines: 23 Hi Florian, Florian Fainelli writes: > Just some general note on the way the driver seems to be going there > seems to be a multiplication of new ops being introduced, and most of > them seem to default to the mv88e6xxx (generic) ones. Should you do > something like: > > if (!ops->foo) > ops->foo = mv88e6xxx_foo > > Such that you reduce the possibility for a specific switch model to lack > such an operation? You are correct, ideally generic library functions (the one starting with the mv88e6xxx_ prefix) should not be assigned to ops. The ops are const though. I'll come up with something maintainable. Thanks! Vivien