[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220701164007.1243684-3-jiri@resnulli.us>
Date: Fri, 1 Jul 2022 18:40:06 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
edumazet@...gle.com, mlxsw@...dia.com, saeedm@...dia.com,
moshe@...dia.com
Subject: [patch net-next v2 2/3] net: devlink: call lockdep_assert_held() for devlink->lock directly
From: Jiri Pirko <jiri@...dia.com>
In devlink.c there is direct access to whole struct devlink so there is
no need to use helper. So obey the customs and work with lock directly
avoiding helpers which might obfuscate things a bit.
Signed-off-by: Jiri Pirko <jiri@...dia.com>
---
net/core/devlink.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/core/devlink.c b/net/core/devlink.c
index 25b481dd1709..a7477addbd59 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -10185,7 +10185,7 @@ int devl_rate_leaf_create(struct devlink_port *devlink_port, void *priv)
struct devlink *devlink = devlink_port->devlink;
struct devlink_rate *devlink_rate;
- devl_assert_locked(devlink_port->devlink);
+ lockdep_assert_held(&devlink_port->devlink->lock);
if (WARN_ON(devlink_port->devlink_rate))
return -EBUSY;
@@ -10224,7 +10224,7 @@ void devl_rate_leaf_destroy(struct devlink_port *devlink_port)
{
struct devlink_rate *devlink_rate = devlink_port->devlink_rate;
- devl_assert_locked(devlink_port->devlink);
+ lockdep_assert_held(&devlink_port->devlink->lock);
if (!devlink_rate)
return;
@@ -10270,7 +10270,7 @@ void devl_rate_nodes_destroy(struct devlink *devlink)
static struct devlink_rate *devlink_rate, *tmp;
const struct devlink_ops *ops = devlink->ops;
- devl_assert_locked(devlink);
+ lockdep_assert_held(&devlink->lock);
list_for_each_entry(devlink_rate, &devlink->rate_list, list) {
if (!devlink_rate->parent)
--
2.35.3
Powered by blists - more mailing lists