devlink: fix the name of value arg of devl_param_driverinit_value_get()
authorJiri Pirko <jiri@nvidia.com>
Fri, 10 Feb 2023 10:01:27 +0000 (11:01 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Feb 2023 09:49:14 +0000 (09:49 +0000)
Probably due to copy-paste error, the name of the arg is "init_val"
which is misleading, as the pointer is used to point to struct where to
store the current value. Rename it to "val" and change the arg comment
a bit on the way.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/devlink.h
net/devlink/leftover.c

index 8ed960345f374cae0564bd8b32f25e9f4c9b16d7..6a942e70e4513253fd054abfb8917412d22d81dd 100644 (file)
@@ -1784,7 +1784,7 @@ void devlink_params_unregister(struct devlink *devlink,
                               const struct devlink_param *params,
                               size_t params_count);
 int devl_param_driverinit_value_get(struct devlink *devlink, u32 param_id,
-                                   union devlink_param_value *init_val);
+                                   union devlink_param_value *val);
 void devl_param_driverinit_value_set(struct devlink *devlink, u32 param_id,
                                     union devlink_param_value init_val);
 void devl_param_value_changed(struct devlink *devlink, u32 param_id);
index f74aca8ba3aba481923dd9babbc6ad717b18ac71..c3c82d5d563e1e3a03d9c6c5f1b80a54c25f72d1 100644 (file)
@@ -9629,13 +9629,14 @@ EXPORT_SYMBOL_GPL(devlink_params_unregister);
  *
  *     @devlink: devlink
  *     @param_id: parameter ID
- *     @init_val: value of parameter in driverinit configuration mode
+ *     @val: pointer to store the value of parameter in driverinit
+ *           configuration mode
  *
  *     This function should be used by the driver to get driverinit
  *     configuration for initialization after reload command.
  */
 int devl_param_driverinit_value_get(struct devlink *devlink, u32 param_id,
-                                   union devlink_param_value *init_val)
+                                   union devlink_param_value *val)
 {
        struct devlink_param_item *param_item;
 
@@ -9655,7 +9656,7 @@ int devl_param_driverinit_value_get(struct devlink *devlink, u32 param_id,
                                                      DEVLINK_PARAM_CMODE_DRIVERINIT)))
                return -EOPNOTSUPP;
 
-       *init_val = param_item->driverinit_value;
+       *val = param_item->driverinit_value;
 
        return 0;
 }