netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@google.com, tariqt@nvidia.com, saeedm@nvidia.com,
	jacob.e.keller@intel.com, gal@nvidia.com, kim.phillips@amd.com,
	moshe@nvidia.com, simon.horman@corigine.com, idosch@nvidia.com
Subject: [patch net-next v2 3/7] devlink: fix the name of value arg of devl_param_driverinit_value_get()
Date: Fri, 10 Feb 2023 11:01:27 +0100	[thread overview]
Message-ID: <20230210100131.3088240-4-jiri@resnulli.us> (raw)
In-Reply-To: <20230210100131.3088240-1-jiri@resnulli.us>

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(-)

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


  parent reply	other threads:[~2023-02-10 10:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10 10:01 [patch net-next v2 0/7] devlink: params cleanups and devl_param_driverinit_value_get() fix Jiri Pirko
2023-02-10 10:01 ` [patch net-next v2 1/7] devlink: don't use strcpy() to copy param value Jiri Pirko
2023-02-10 19:33   ` Jacob Keller
2023-02-10 10:01 ` [patch net-next v2 2/7] devlink: make sure driver does not read updated driverinit param before reload Jiri Pirko
2023-02-10 10:33   ` Simon Horman
2023-02-10 10:01 ` Jiri Pirko [this message]
2023-02-10 19:35   ` [patch net-next v2 3/7] devlink: fix the name of value arg of devl_param_driverinit_value_get() Jacob Keller
2023-02-10 10:01 ` [patch net-next v2 4/7] devlink: use xa_for_each_start() helper in devlink_nl_cmd_port_get_dump_one() Jiri Pirko
2023-02-10 19:36   ` Jacob Keller
2023-02-10 10:01 ` [patch net-next v2 5/7] devlink: convert param list to xarray Jiri Pirko
2023-02-10 19:37   ` Jacob Keller
2023-02-10 10:01 ` [patch net-next v2 6/7] devlink: allow to call devl_param_driverinit_value_get() without holding instance lock Jiri Pirko
2023-02-10 19:41   ` Jacob Keller
2023-02-13  7:44     ` Jiri Pirko
2023-02-10 22:11   ` Kim Phillips
2023-02-10 10:01 ` [patch net-next v2 7/7] devlink: add forgotten devlink instance lock assertion to devl_param_driverinit_value_set() Jiri Pirko
2023-02-10 19:42   ` Jacob Keller
2023-02-13 10:00 ` [patch net-next v2 0/7] devlink: params cleanups and devl_param_driverinit_value_get() fix patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230210100131.3088240-4-jiri@resnulli.us \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=idosch@nvidia.com \
    --cc=jacob.e.keller@intel.com \
    --cc=kim.phillips@amd.com \
    --cc=kuba@kernel.org \
    --cc=moshe@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=simon.horman@corigine.com \
    --cc=tariqt@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).