diff mbox series

[net-next,v2,3/7] devlink: fix the name of value arg of devl_param_driverinit_value_get()

Message ID 20230210100131.3088240-4-jiri@resnulli.us (mailing list archive)
State Accepted
Commit 94ba1c316b9c0f9b017f7cd7eac84adae693e80f
Delegated to: Netdev Maintainers
Headers show
Series devlink: params cleanups and devl_param_driverinit_value_get() fix | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 383 this patch: 383
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 18 this patch: 18
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 534 this patch: 534
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 32 lines checked
netdev/kdoc success Errors and warnings before: 14 this patch: 14
netdev/source_inline success Was 0 now: 0

Commit Message

Jiri Pirko Feb. 10, 2023, 10:01 a.m. UTC
From: Jiri Pirko <jiri@nvidia.com>

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>
---
 include/net/devlink.h  | 2 +-
 net/devlink/leftover.c | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

Comments

Jacob Keller Feb. 10, 2023, 7:35 p.m. UTC | #1
On 2/10/2023 2:01 AM, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@nvidia.com>
> 
> 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>

> ---
>  include/net/devlink.h  | 2 +-
>  net/devlink/leftover.c | 7 ++++---
>  2 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/include/net/devlink.h b/include/net/devlink.h
> index 8ed960345f37..6a942e70e451 100644
> --- a/include/net/devlink.h
> +++ b/include/net/devlink.h
> @@ -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);
> diff --git a/net/devlink/leftover.c b/net/devlink/leftover.c
> index 61e59556ea03..dab7326dc3ea 100644
> --- a/net/devlink/leftover.c
> +++ b/net/devlink/leftover.c
> @@ -9630,13 +9630,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;
>  
> @@ -9656,7 +9657,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;
>  }
diff mbox series

Patch

diff --git a/include/net/devlink.h b/include/net/devlink.h
index 8ed960345f37..6a942e70e451 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -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);
diff --git a/net/devlink/leftover.c b/net/devlink/leftover.c
index 61e59556ea03..dab7326dc3ea 100644
--- a/net/devlink/leftover.c
+++ b/net/devlink/leftover.c
@@ -9630,13 +9630,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;
 
@@ -9656,7 +9657,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;
 }