Date: Tue, 3 Jun 2025 18:37:45 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: d87ee937ed85 - main - LinuxKPI: 802.11: use macros for locking Message-ID: <202506031837.553Ibjgm000601@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d87ee937ed852cd22eac808bc8fcf7b0e34c9ec1 commit d87ee937ed852cd22eac808bc8fcf7b0e34c9ec1 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2025-05-25 16:44:55 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2025-06-03 18:35:10 +0000 LinuxKPI: 802.11: use macros for locking Rather than using inline functions use macros so we know where we are taking the lock in the code rather than only recording the inline function location. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/include/net/cfg80211.h | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index 1e4f917a2796..7849c77062dc 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -1408,20 +1408,11 @@ wiphy_dev(struct wiphy *wiphy) return (wiphy->dev); } -#define wiphy_dereference(wiphy, p) \ - rcu_dereference_check(p, lockdep_is_held(&(wiphy)->mtx)) +#define wiphy_dereference(_w, p) \ + rcu_dereference_check(p, lockdep_is_held(&(_w)->mtx)) -static __inline void -wiphy_lock(struct wiphy *wiphy) -{ - mutex_lock(&wiphy->mtx); -} - -static __inline void -wiphy_unlock(struct wiphy *wiphy) -{ - mutex_unlock(&wiphy->mtx); -} +#define wiphy_lock(_w) mutex_lock(&(_w)->mtx) +#define wiphy_unlock(_w) mutex_unlock(&(_w)->mtx) static __inline void wiphy_rfkill_set_hw_state_reason(struct wiphy *wiphy, bool blocked,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202506031837.553Ibjgm000601>