From patchwork Mon Nov 28 04:15:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Mailhol X-Patchwork-Id: 13057026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48267C433FE for ; Mon, 28 Nov 2022 04:18:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229720AbiK1ER6 (ORCPT ); Sun, 27 Nov 2022 23:17:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229694AbiK1ERi (ORCPT ); Sun, 27 Nov 2022 23:17:38 -0500 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B997BE0F0; Sun, 27 Nov 2022 20:16:22 -0800 (PST) Received: by mail-pf1-x435.google.com with SMTP id w79so9306920pfc.2; Sun, 27 Nov 2022 20:16:22 -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=JP07mtQeL4FoUwgrGCKcP+kaqfn/uraWOSBYR49R4Wc=; b=B/ryohjVzWGAcm4RyIh/KKH18vl51x3P0Ob0PC9ybUR1GZDIIOgGoChPu5qYIVEJde Ei4qEjC3vyfhnW2ar4QWStz3kz2jcuHNjmhybu18hRnK0BKh/KmVvVUKvJhbHop817u4 uYOzs+untBIapddsqsSBt+YSXSoYMGVSREx4g7L7E7WsqppycspDlnRfXMh4YUNdA6VR 8WEd1rltbRU0MWmMef5fJue1IlykmtSxrJ+9z3Wpy2xP5SXLGKK7dm1kiGq54tM+91pL NdqMVrAwPr9lm3FVCcvoE0BSN0of4EH+CrbxNpBwX/SOqlCybTJkSWsqD+Slj7BVV30y iutA== 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=JP07mtQeL4FoUwgrGCKcP+kaqfn/uraWOSBYR49R4Wc=; b=kDDFSKHJrl5NwQMYFANE8jMmQDdjz0DXoS5rHuUSqGf6Hz57v3YBjwKd4Luq1OX9wp AI2RJNRRmSVThfFH/BtP50H2RfaDb+kVy1zccbN8M6c+1NhCi2iYVsBf1yhJwIO8buSU 0HOq/zYWAcZ4EEl+k+XzG/YeMVfs6hZjPcXWkk6BObVYvgOdfXUzA0Sl7oowTbkB5CVZ 2LjCCMfz4Z8BqvRfA/sK0kvF9cR0YxI4X63SBU85hpaYmSrKPM7v0kVZyaI2EUfZ6M+h TwZ5rd5PbKGeC7fL6bLRUCyvWXdZU5Sw9RWxzWDHAS+OYOrnvwj5TgaoIUt828xeOS6P rCgQ== X-Gm-Message-State: ANoB5pl0w4lGaPsy7nk2rNsJ01d+y58vwTVh3tTtlV7Y2b5Ke0t/FgGX On2srbKhBakAIJmhXyeaTqE= X-Google-Smtp-Source: AA0mqf75upGbV5lvxzqh1VVZxQS0/rYGVu0axw2fpBIERVDskDYZk3NTlkCPACQRB+qe4OutHSFRoA== X-Received: by 2002:aa7:9696:0:b0:574:aa0b:bdc3 with SMTP id f22-20020aa79696000000b00574aa0bbdc3mr16260327pfk.18.1669608979829; Sun, 27 Nov 2022 20:16:19 -0800 (PST) Received: from XH22050090-L.ad.ts.tri-ad.global ([103.175.111.222]) by smtp.gmail.com with ESMTPSA id z5-20020aa79f85000000b0056bbebbcafbsm6927107pfr.100.2022.11.27.20.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Nov 2022 20:16:19 -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 v4 2/3] net: devlink: remove devlink_info_driver_name_put() Date: Mon, 28 Nov 2022 13:15:44 +0900 Message-Id: <20221128041545.3170897-3-mailhol.vincent@wanadoo.fr> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221128041545.3170897-1-mailhol.vincent@wanadoo.fr> References: <20221122154934.13937-1-mailhol.vincent@wanadoo.fr> <20221128041545.3170897-1-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org 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; }