Commit 6e6fbb72 authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch 'net-devlink-couple-of-trivial-fixes'

Jiri Pirko says:

====================
net: devlink: couple of trivial fixes

Just a couple of trivial fixes I found on the way.
====================

Link: https://lore.kernel.org/r/20220713141853.2992014-1-jiri@resnulli.usSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 816cd168 a44c4511
......@@ -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;
......
......@@ -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,
......
......@@ -1700,9 +1700,9 @@ static int devlink_nl_cmd_port_unsplit_doit(struct sk_buff *skb,
return devlink->ops->port_unsplit(devlink, devlink_port, info->extack);
}
static int devlink_port_new_notifiy(struct devlink *devlink,
unsigned int port_index,
struct genl_info *info)
static int devlink_port_new_notify(struct devlink *devlink,
unsigned int port_index,
struct genl_info *info)
{
struct devlink_port *devlink_port;
struct sk_buff *msg;
......@@ -1724,8 +1724,7 @@ static int devlink_port_new_notifiy(struct devlink *devlink,
if (err)
goto out;
err = genlmsg_reply(msg, info);
return err;
return genlmsg_reply(msg, info);
out:
nlmsg_free(msg);
......@@ -1775,7 +1774,7 @@ static int devlink_nl_cmd_port_new_doit(struct sk_buff *skb,
if (err)
return err;
err = devlink_port_new_notifiy(devlink, new_port_index, info);
err = devlink_port_new_notify(devlink, new_port_index, info);
if (err && err != -ENODEV) {
/* Fail to send the response; destroy newly created port. */
devlink->ops->port_del(devlink, new_port_index, extack);
......@@ -10425,13 +10424,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment