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>
Subject: [Intel-wired-lan] [PATCH iwl-next v1 2/3] devlink: add devl guard
Date: Wed, 23 Oct 2024 12:07:02 +0200 [thread overview]
Message-ID: <20241023100702.12606-3-konrad.knitter@intel.com> (raw)
In-Reply-To: <20241023100702.12606-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>
---
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-10-23 9:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 10:07 [Intel-wired-lan] [PATCH iwl-next v1 0/3] support FW Recovery Mode Konrad Knitter
2024-10-23 10:07 ` [Intel-wired-lan] [PATCH iwl-next v1 1/3] pldmfw: selected component update Konrad Knitter
2024-10-23 10:07 ` Paul Menzel
2024-10-23 10:46 ` Knitter, Konrad
2024-10-23 21:26 ` Keller, Jacob E
2024-11-05 13:01 ` Pucha, HimasekharX Reddy
2024-10-23 10:07 ` Konrad Knitter [this message]
2024-11-05 12:57 ` [Intel-wired-lan] [PATCH iwl-next v1 2/3] devlink: add devl guard Pucha, HimasekharX Reddy
2024-10-23 10:07 ` [Intel-wired-lan] [PATCH iwl-next v1 3/3] ice: support FW Recovery Mode Konrad Knitter
2024-11-05 12:54 ` Pucha, HimasekharX Reddy
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=20241023100702.12606-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=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