From patchwork Sun Nov 27 13:09:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Mailhol X-Patchwork-Id: 26360 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5110611wrr; Sun, 27 Nov 2022 05:18:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf6qAmDs465mb+4DuSi82W02v5yFobmi5v0y4abtuXdcsw70sznWaABCs1cIqZNBc22YBwXY X-Received: by 2002:a17:902:b691:b0:188:5240:50ec with SMTP id c17-20020a170902b69100b00188524050ecmr27592784pls.168.1669555085675; Sun, 27 Nov 2022 05:18:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669555085; cv=none; d=google.com; s=arc-20160816; b=hCVQg6d1WYCWMdKcsGT7qGeVsP4vikdQrwbXk51Jl3LniokNvVgb/7N7/NLn3cENrT ow8hNOJ5SeZBpHVYoQMjOIg6qK6Z1MCmaNWmyxoek7UVzufC78UvZ6DCPPb/RVB9tszJ Xskpw4r9/qw0knuZ5Sh83mO80UGOqB98//Clkn03SRgHM3aaBnFj6vhzXUG3mLbICSA+ FU+3D+Ufhz429Cv8qKUTDe7IXVOEdc7tSfZCQ+vmvfvB5q77PXxinyAuHhqeyhTRY2jE jGOzKG54ciVNcJ3ODRHVoziW+jfLH8ElnqOqQaWWTGX46R34BHaF7opfUdhzPXZfT4aD uqiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=OxNviUPHTCGHIw1xqWHS/MPtnV3RpWOBq4yIBMcYMgw=; b=p4euObq1nbZLbXTsLdB3NPTWgYusO3JnsHFoK69Sd/hmO3YSjqi+57viGSXlzM0mfA 9EzgZ+w/GNtpqgrZmz0YM3T22bKoq7gM/jVJ9akzNnZ3nVQlhNoNAhDHN4H1kk2kztlV GbPDdjgWbgbFQf63Vm2cTQ0BqAoNp/koshEL/miyLbsCjHcDc5WpA9oVSmXgWX3qSTec 0aEg2d37RO6DRV8YKh2LzJraHa4LksSq8jy1QiyLQx2JLxlQF8o3fzpCvP5B6ldetVEM NUD9Oc6sCxxvA2myD9tHcfcJBVUihe6OCZD0PtxkVZQX8oWTPDkLcZc9MIbSmsnkJDE7 0pqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aOwF2DGK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p4-20020a056a000b4400b0056ce0f64370si9665269pfo.108.2022.11.27.05.17.51; Sun, 27 Nov 2022 05:18:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aOwF2DGK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229602AbiK0NLT (ORCPT + 99 others); Sun, 27 Nov 2022 08:11:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229737AbiK0NKt (ORCPT ); Sun, 27 Nov 2022 08:10:49 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD473DFA4; Sun, 27 Nov 2022 05:10:26 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id t11-20020a17090a024b00b0021932afece4so628609pje.5; Sun, 27 Nov 2022 05:10:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=OxNviUPHTCGHIw1xqWHS/MPtnV3RpWOBq4yIBMcYMgw=; b=aOwF2DGKnJ17bhHDKmrmab4OFrvr6sHKBHX0zow1gGQgrlsbBTABqy+qAAjNeapBBi yb0oyPbubMaIJKDGCsx7HqtkWHSdH9ZBdsyB9PZGDUQdbkxyTKkNN+cWCM0v4WrWG1N9 5GhzU7ErOeK7tsJPw/fx8AMbH6lRhB8iHDer2Ljp0aDgSvQo7qduzkO/0o5BfTfPylbF ycN4pZpl0KRyAD8zSld/LV5tUYiMIZCDjyYI1W0yhJyCQQsM4ZheZmsjywOWoFBQ1Xia b4mJhjqUjyH4mGJXzWd1IYcfxm5kp8fAjOn7762fKoQJEfY/vocYjmi118FGpgnnXlyd ge/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=OxNviUPHTCGHIw1xqWHS/MPtnV3RpWOBq4yIBMcYMgw=; b=fn0xfGwBPhuWY9od2QZ8+mYXHxLP7Bfy7hbBBjRfVToKT1qD3bU/w1xcl0tKw/bhzu Til6X1pHaDfIIXmTLGsZ7AOGWko+Dv75+9DapiOtAPt6jonlh63WyKElUazDFKmw8N8K r1udfjZ4wWXBJb3U9tSy0pnbuTXZNVGPs38ecAC6m3qcjoPCDqgMTjrCadWFehY09P6K YMyozefl1a8ZS3F7LLzPPfXfAsHXaovwnm6/0kBNYLbr1MpbjZkyUY5Y11ytSrDKSRSU olkE0Jiuj2ozfaIxfWYpJU1y+KShc6jUqIrLy5sVshPDZnPk6g2gbQ5Z96//b5MZIacb rfNA== X-Gm-Message-State: ANoB5pkTKAp9FIl8VLK0VqmdH7PxxRQPXgLFtUTAm7dNuG/ll6e7EmN7 ZE/D9NzLAgGNQDwYMGer2Ho= X-Received: by 2002:a17:902:82c3:b0:189:82da:7b63 with SMTP id u3-20020a17090282c300b0018982da7b63mr2667941plz.68.1669554626030; Sun, 27 Nov 2022 05:10:26 -0800 (PST) Received: from localhost.localdomain (124x33x176x97.ap124.ftth.ucom.ne.jp. [124.33.176.97]) by smtp.gmail.com with ESMTPSA id q17-20020a170902eb9100b00188a908cbddsm6710225plg.302.2022.11.27.05.10.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Nov 2022 05:10:25 -0800 (PST) Sender: Vincent Mailhol From: Vincent Mailhol To: Jiri Pirko , netdev@vger.kernel.org, Jakub Kicinski Cc: "David S . Miller" , Eric Dumazet , Paolo Abeni , linux-kernel@vger.kernel.org, Boris Brezillon , Arnaud Ebalard , Srujana Challa , Kurt Kanzenbach , Andrew Lunn , Florian Fainelli , Vladimir Oltean , Michael Chan , Ioana Ciornei , Dimitris Michailidis , Yisen Zhuang , Salil Mehta , Jesse Brandeburg , Tony Nguyen , Sunil Goutham , Linu Cherian , Geetha sowjanya , Jerin Jacob , hariprasad , Subbaraya Sundeep , Taras Chornyi , Saeed Mahameed , Leon Romanovsky , Ido Schimmel , Petr Machata , Simon Horman , Shannon Nelson , drivers@pensando.io, Ariel Elior , Manish Chopra , Jonathan Lemon , Vadim Fedorenko , Richard Cochran , Vadim Pasternak , Shalom Toledo , linux-crypto@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-rdma@vger.kernel.org, oss-drivers@corigine.com, Jiri Pirko , Herbert Xu , Hao Chen , Guangbin Huang , Minghao Chi , Shijith Thotton , Vincent Mailhol Subject: [PATCH net-next v3 4/5] net: devlink: remove devlink_info_driver_name_put() Date: Sun, 27 Nov 2022 22:09:18 +0900 Message-Id: <20221127130919.638324-5-mailhol.vincent@wanadoo.fr> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221127130919.638324-1-mailhol.vincent@wanadoo.fr> References: <20221122154934.13937-1-mailhol.vincent@wanadoo.fr> <20221127130919.638324-1-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750637770146323061?= X-GMAIL-MSGID: =?utf-8?q?1750655393324361540?= Now that the core sets the driver name attribute, drivers are not supposed to call devlink_info_driver_name_put() anymore. Remove it. Signed-off-by: Vincent Mailhol --- include/net/devlink.h | 2 -- net/core/devlink.c | 11 ++--------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/include/net/devlink.h b/include/net/devlink.h index 074a79b8933f..52d5fb67e9b8 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -1746,8 +1746,6 @@ int devlink_region_snapshot_create(struct devlink_region *region, u8 *data, u32 snapshot_id); int devlink_info_serial_number_put(struct devlink_info_req *req, const char *sn); -int devlink_info_driver_name_put(struct devlink_info_req *req, - const char *name); int devlink_info_board_serial_number_put(struct devlink_info_req *req, const char *bsn); diff --git a/net/core/devlink.c b/net/core/devlink.c index 6478135d9ba1..3babc16eeb6b 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -6633,14 +6633,6 @@ static int devlink_nl_cmd_region_read_dumpit(struct sk_buff *skb, return err; } -int devlink_info_driver_name_put(struct devlink_info_req *req, const char *name) -{ - if (!req->msg) - return 0; - return nla_put_string(req->msg, DEVLINK_ATTR_INFO_DRIVER_NAME, name); -} -EXPORT_SYMBOL_GPL(devlink_info_driver_name_put); - int devlink_info_serial_number_put(struct devlink_info_req *req, const char *sn) { if (!req->msg) @@ -6756,7 +6748,8 @@ static int devlink_nl_driver_info_get(struct device_driver *drv, return 0; if (drv->name[0]) - return devlink_info_driver_name_put(req, drv->name); + return nla_put_string(req->msg, DEVLINK_ATTR_INFO_DRIVER_NAME, + drv->name); return 0; }