diff options
author | Jiri Pirko <jiri@nvidia.com> | 2022-07-13 16:18:51 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-07-14 21:58:46 -0700 |
commit | 9a7923668bc779dd601d94704b4dd895a2ef6a77 (patch) | |
tree | a743ca5527bcdb7096a981903b7ae23daefbe554 | |
parent | 816cd1688331e0ffa1927889c15e7ed56650a183 (diff) | |
download | linux-9a7923668bc779dd601d94704b4dd895a2ef6a77.tar.gz linux-9a7923668bc779dd601d94704b4dd895a2ef6a77.tar.bz2 linux-9a7923668bc779dd601d94704b4dd895a2ef6a77.zip |
net: devlink: make devlink_dpipe_headers_register() return void
The return value is not used, so change the return value type to void.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c | 6 | ||||
-rw-r--r-- | include/net/devlink.h | 2 | ||||
-rw-r--r-- | 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); |