Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C027BC433DB for ; Sat, 20 Mar 2021 14:23:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 81E9061935 for ; Sat, 20 Mar 2021 14:23:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229843AbhCTOWs (ORCPT ); Sat, 20 Mar 2021 10:22:48 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:38530 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229870AbhCTOWr (ORCPT ); Sat, 20 Mar 2021 10:22:47 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lNcUw-00C3B8-OD; Sat, 20 Mar 2021 15:22:38 +0100 Date: Sat, 20 Mar 2021 15:22:38 +0100 From: Andrew Lunn To: Kurt Kanzenbach Cc: Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org Subject: Re: [PATCH net-next] net: dsa: hellcreek: Report switch name and ID Message-ID: References: <20210320112715.8667-1-kurt@kmk-computers.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210320112715.8667-1-kurt@kmk-computers.de> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > +static int hellcreek_devlink_info_get(struct dsa_switch *ds, > + struct devlink_info_req *req, > + struct netlink_ext_ack *extack) > +{ > + struct hellcreek *hellcreek = ds->priv; > + int ret; > + > + ret = devlink_info_driver_name_put(req, "hellcreek"); > + if (ret) > + return ret; > + > + return devlink_info_version_fixed_put(req, > + DEVLINK_INFO_VERSION_GENERIC_ASIC_ID, > + hellcreek->pdata->name); > static const struct hellcreek_platform_data de1soc_r1_pdata = { > + .name = "Hellcreek r4c30", Hi Kurt The two other DSA drivers which implement this keep the DEVLINK_INFO_VERSION_GENERIC_ASIC_ID just the model name, mv88e6390, SJA1105E for example. You have hellcreek in the driver name, so i don't see a need to repeat it. Andrew