From: Konrad Knitter <konrad.knitter@intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: jacob.e.keller@intel.com, netdev@vger.kernel.org,
jiri@resnulli.us, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, linux-kernel@vger.kernel.org,
anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com,
Konrad Knitter <konrad.knitter@intel.com>,
Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com>
Subject: [Intel-wired-lan] [PATCH iwl-next v2 2/3] devlink: add devl guard
Date: Wed, 6 Nov 2024 10:36:42 +0100 [thread overview]
Message-ID: <20241106093643.106476-3-konrad.knitter@intel.com> (raw)
In-Reply-To: <20241106093643.106476-1-konrad.knitter@intel.com>
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)
---
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
next prev parent reply other threads:[~2024-11-06 9:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 9:36 [Intel-wired-lan] [PATCH iwl-next v2 0/3] support FW Recovery Mode Konrad Knitter
2024-11-06 9:36 ` [Intel-wired-lan] [PATCH iwl-next v2 1/3] pldmfw: enable selected component update Konrad Knitter
2024-11-06 9:36 ` Konrad Knitter [this message]
2024-11-06 9:36 ` [Intel-wired-lan] [PATCH iwl-next v2 3/3] ice: support FW Recovery Mode Konrad Knitter
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=20241106093643.106476-3-konrad.knitter@intel.com \
--to=konrad.knitter@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=himasekharx.reddy.pucha@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.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