[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220712104853.2831646-2-jiri@resnulli.us>
Date: Tue, 12 Jul 2022 12:48:51 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
edumazet@...gle.com, mlxsw@...dia.com, saeedm@...dia.com,
moshe@...dia.com
Subject: [patch net-next 1/3] net: devlink: make devlink_dpipe_headers_register() return void
From: Jiri Pirko <jiri@...dia.com>
The return value is not used, so change the return value type to void.
Signed-off-by: Jiri Pirko <jiri@...dia.com>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 6 ++----
include/net/devlink.h | 2 +-
net/core/devlink.c | 5 ++---
3 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
index 5d494fabf93d..c2540292702d 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c
@@ -1266,10 +1266,8 @@ int mlxsw_sp_dpipe_init(struct mlxsw_sp *mlxsw_sp)
struct devlink *devlink = priv_to_devlink(mlxsw_sp->core);
int err;
- err = devlink_dpipe_headers_register(devlink,
- &mlxsw_sp_dpipe_headers);
- if (err)
- return err;
+ devlink_dpipe_headers_register(devlink, &mlxsw_sp_dpipe_headers);
+
err = mlxsw_sp_dpipe_erif_table_init(mlxsw_sp);
if (err)
goto err_erif_table_init;
diff --git a/include/net/devlink.h b/include/net/devlink.h
index b1b5c19a8316..88c701b375a2 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -1590,7 +1590,7 @@ int devlink_dpipe_table_register(struct devlink *devlink,
void *priv, bool counter_control_extern);
void devlink_dpipe_table_unregister(struct devlink *devlink,
const char *table_name);
-int devlink_dpipe_headers_register(struct devlink *devlink,
+void devlink_dpipe_headers_register(struct devlink *devlink,
struct devlink_dpipe_headers *dpipe_headers);
void devlink_dpipe_headers_unregister(struct devlink *devlink);
bool devlink_dpipe_table_counter_enabled(struct devlink *devlink,
diff --git a/net/core/devlink.c b/net/core/devlink.c
index 2b2e454ebd78..c261bba9ab76 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -10425,13 +10425,12 @@ EXPORT_SYMBOL_GPL(devlink_sb_unregister);
*
* Register the headers supported by hardware.
*/
-int devlink_dpipe_headers_register(struct devlink *devlink,
- struct devlink_dpipe_headers *dpipe_headers)
+void devlink_dpipe_headers_register(struct devlink *devlink,
+ struct devlink_dpipe_headers *dpipe_headers)
{
devl_lock(devlink);
devlink->dpipe_headers = dpipe_headers;
devl_unlock(devlink);
- return 0;
}
EXPORT_SYMBOL_GPL(devlink_dpipe_headers_register);
--
2.35.3
Powered by blists - more mailing lists