[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221127081604.5242-5-mailhol.vincent@wanadoo.fr>
Date: Sun, 27 Nov 2022 17:16:03 +0900
From: Vincent Mailhol <mailhol.vincent@...adoo.fr>
To: Jiri Pirko <jiri@...dia.com>, netdev@...r.kernel.org,
Jakub Kicinski <kuba@...nel.org>
Cc: "David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>, linux-kernel@...r.kernel.org,
Boris Brezillon <bbrezillon@...nel.org>,
Arnaud Ebalard <arno@...isbad.org>,
Srujana Challa <schalla@...vell.com>,
Kurt Kanzenbach <kurt@...utronix.de>,
Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
Michael Chan <michael.chan@...adcom.com>,
Ioana Ciornei <ioana.ciornei@....com>,
Dimitris Michailidis <dmichail@...gible.com>,
Yisen Zhuang <yisen.zhuang@...wei.com>,
Salil Mehta <salil.mehta@...wei.com>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Tony Nguyen <anthony.l.nguyen@...el.com>,
Sunil Goutham <sgoutham@...vell.com>,
Linu Cherian <lcherian@...vell.com>,
Geetha sowjanya <gakula@...vell.com>,
Jerin Jacob <jerinj@...vell.com>,
hariprasad <hkelam@...vell.com>,
Subbaraya Sundeep <sbhatta@...vell.com>,
Taras Chornyi <tchornyi@...vell.com>,
Saeed Mahameed <saeedm@...dia.com>,
Leon Romanovsky <leon@...nel.org>,
Ido Schimmel <idosch@...dia.com>,
Petr Machata <petrm@...dia.com>,
Simon Horman <simon.horman@...igine.com>,
Shannon Nelson <snelson@...sando.io>, drivers@...sando.io,
Ariel Elior <aelior@...vell.com>,
Manish Chopra <manishc@...vell.com>,
Jonathan Lemon <jonathan.lemon@...il.com>,
Vadim Fedorenko <vadfed@...com>,
Richard Cochran <richardcochran@...il.com>,
Vadim Pasternak <vadimp@...lanox.com>,
Shalom Toledo <shalomt@...lanox.com>,
linux-crypto@...r.kernel.org, intel-wired-lan@...ts.osuosl.org,
linux-rdma@...r.kernel.org, oss-drivers@...igine.com,
Vincent Mailhol <mailhol.vincent@...adoo.fr>
Subject: [PATCH net-next v2 4/5] net: devlink: remove devlink_info_driver_name_put()
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 <mailhol.vincent@...adoo.fr>
---
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;
}
--
2.37.4
Powered by blists - more mailing lists