mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2025-04-19 20:58:31 +09:00
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@intel.com> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Konrad Knitter <konrad.knitter@intel.com> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
This commit is contained in:
parent
d4679b79ff
commit
0502bd2e06
@ -1535,6 +1535,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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user