Skip to content

Commit 0502bd2

Browse files
konradknitteranguy11
authored andcommitted
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>
1 parent d4679b7 commit 0502bd2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/net/devlink.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,6 +1535,7 @@ int devl_trylock(struct devlink *devlink);
15351535
void devl_unlock(struct devlink *devlink);
15361536
void devl_assert_locked(struct devlink *devlink);
15371537
bool devl_lock_is_held(struct devlink *devlink);
1538+
DEFINE_GUARD(devl, struct devlink *, devl_lock(_T), devl_unlock(_T));
15381539

15391540
struct ib_device;
15401541

0 commit comments

Comments
 (0)