devlink: fix the name of value arg of devl_param_driverinit_value_get()

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>
This commit is contained in:
Jiri Pirko 2023-02-10 11:01:27 +01:00 committed by David S. Miller
parent afd888c3e1
commit 94ba1c316b
2 changed files with 5 additions and 4 deletions

View 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);

View 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;
}