Skip to content

Commit

Permalink
devlink: Constify devlink instance pointer
Browse files Browse the repository at this point in the history
Constify devlink instance pointer while checking if reload operation is
supported or not.

This helps to review the scope of checks done in reload.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Parav Pandit authored and David S. Miller committed Jul 21, 2020
1 parent 336ce1c commit eac5f8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/devlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -2921,7 +2921,7 @@ static void devlink_reload_netns_change(struct devlink *devlink,
DEVLINK_CMD_PARAM_NEW);
}

static bool devlink_reload_supported(struct devlink *devlink)
static bool devlink_reload_supported(const struct devlink *devlink)
{
return devlink->ops->reload_down && devlink->ops->reload_up;
}
Expand Down

0 comments on commit eac5f8a

Please sign in to comment.