From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756054AbcHXVPu (ORCPT ); Wed, 24 Aug 2016 17:15:50 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:33001 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755520AbcHXVPq (ORCPT ); Wed, 24 Aug 2016 17:15:46 -0400 Subject: Re: [PATCH net-next] net: dsa: rename switch operations structure To: Vivien Didelot , netdev@vger.kernel.org References: <20160823163856.21456-1-vivien.didelot@savoirfairelinux.com> Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Andrew Lunn From: Florian Fainelli Message-ID: Date: Wed, 24 Aug 2016 14:15:39 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160823163856.21456-1-vivien.didelot@savoirfairelinux.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/23/2016 09:38 AM, Vivien Didelot wrote: > Now that the dsa_switch_driver structure contains only function pointers > as it is supposed to, rename it to the more appropriate dsa_switch_ops, > uniformly to any other operations structure in the kernel. > > No functional changes here, basically just the result of something like: > s/dsa_switch_driver *drv/dsa_switch_ops *ops/g > > However keep the {un,}register_switch_driver functions and their > dsa_switch_drivers list as is, since they represent the -- likely to be > deprecated soon -- legacy DSA registration framework. > > In the meantime, also fix the following checks from checkpatch.pl to > make it happy with this patch: > > CHECK: Comparison to NULL could be written "!ops" > #403: FILE: net/dsa/dsa.c:470: > + if (ops == NULL) { > > CHECK: Comparison to NULL could be written "ds->ops->get_strings" > #773: FILE: net/dsa/slave.c:697: > + if (ds->ops->get_strings != NULL) > > CHECK: Comparison to NULL could be written "ds->ops->get_ethtool_stats" > #824: FILE: net/dsa/slave.c:785: > + if (ds->ops->get_ethtool_stats != NULL) > > CHECK: Comparison to NULL could be written "ds->ops->get_sset_count" > #835: FILE: net/dsa/slave.c:798: > + if (ds->ops->get_sset_count != NULL) > > total: 0 errors, 0 warnings, 4 checks, 784 lines checked > > Signed-off-by: Vivien Didelot Acked-by: Florian Fainelli Thanks! -- Florian