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 <pa...@mellanox.com>
Reviewed-by: Jiri Pirko <j...@mellanox.com>
---
 net/core/devlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/devlink.c b/net/core/devlink.c
index 5c74e67f358c..8b7bb4bfb6d0 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -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;
 }
-- 
2.25.4

Reply via email to