[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241023100702.12606-3-konrad.knitter@intel.com>
Date: Wed, 23 Oct 2024 12:07:02 +0200
From: Konrad Knitter <konrad.knitter@...el.com>
To: intel-wired-lan@...ts.osuosl.org
Cc: jacob.e.keller@...el.com,
netdev@...r.kernel.org,
jiri@...nulli.us,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
linux-kernel@...r.kernel.org,
anthony.l.nguyen@...el.com,
przemyslaw.kitszel@...el.com,
Konrad Knitter <konrad.knitter@...el.com>
Subject: [PATCH iwl-next v1 2/3] devlink: add devl guard
Add devl guard for scoped_guard().
Example usage:
scoped_guard(devl, priv_to_devlink(pf)) {
err = init_devlink(pf);
if (err)
return err;
}
Co-developed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
Signed-off-by: Konrad Knitter <konrad.knitter@...el.com>
---
include/net/devlink.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/net/devlink.h b/include/net/devlink.h
index 7f5b36554778..6fa46ed3345f 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -1534,6 +1534,7 @@ int devl_trylock(struct devlink *devlink);
void devl_unlock(struct devlink *devlink);
void devl_assert_locked(struct devlink *devlink);
bool devl_lock_is_held(struct devlink *devlink);
+DEFINE_GUARD(devl, struct devlink *, devl_lock(_T), devl_unlock(_T));
struct ib_device;
--
2.38.1
Powered by blists - more mailing lists