Skip to contentSkip to conversation

cfg80211: convert mutex assert to macro

PATCH New Johannes Berg 1 participant 1 message Apr 11, 2009 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 cfg80211: convert mutex assert to macro

That will make the various cases where the WARN_ON can happen distinguishable.

---
 net/wireless/core.h |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
net/wireless/core.h +1 -4
@@ -73,10 +73,7 @@ bool wiphy_idx_valid(int wiphy_idx)
 extern struct mutex cfg80211_mutex;
 extern struct list_head cfg80211_drv_list;
 
-static inline void assert_cfg80211_lock(void)
-{
-	WARN_ON(!mutex_is_locked(&cfg80211_mutex));
-}
+#define assert_cfg80211_lock() WARN_ON(!mutex_is_locked(&cfg80211_mutex))
 
 /*
  * You can use this to mark a wiphy_idx as not having an associated wiphy.