Skip to contentSkip to conversation

cfg80211: remove spurious __KERNEL__ ifdef

PATCH In review Johannes Berg 3 participants 3 messages Sep 30, 2010 – Oct 4, 2010 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 cfg80211: remove spurious __KERNEL__ ifdef

From: Johannes Berg <[email protected]>

The net/cfg80211.h header file isn't exported to
userspace, so there's no need for any kind of
__KERNEL__ protection in it. If it was exported,
everything else in it would need protection as
well, not just the logging stuff ...

---
Might be something that slipped in elsewhere too?

 include/net/cfg80211.h |    4 ----
 1 file changed, 4 deletions(-)
include/net/cfg80211.h +0 -4
@@ -2551,8 +2551,6 @@ void cfg80211_cqm_rssi_notify(struct net
 			      enum nl80211_cqm_rssi_threshold_event rssi_event,
 			      gfp_t gfp);
 
-#ifdef __KERNEL__
-
 /* Logging, debugging and troubleshooting/diagnostic helpers. */
 
 /* wiphy_printk helpers, similar to dev_printk */
@@ -2599,6 +2597,4 @@ void cfg80211_cqm_rssi_notify(struct net
 #define wiphy_WARN(wiphy, format, args...)			\
 	WARN(1, "wiphy: %s\n" format, wiphy_name(wiphy), ##args);
 
-#endif
-
 #endif /* __NET_CFG80211_H */
#1 lore raw
Quoted 8 lines · Johannes Berg

From: Johannes Berg <[email protected]>

The net/cfg80211.h header file isn't exported to
userspace, so there's no need for any kind of
__KERNEL__ protection in it. If it was exported,
everything else in it would need protection as
well, not just the logging stuff ...

Quoted 4 lines

---
Might be something that slipped in elsewhere too?

I thought John was going to remove that guard.

http://lkml.org/lkml/2010/7/27/294

I believe John removed the other one.

#2 lore raw
Quoted 14 lines · Joe Perches
Quoted 8 lines · Johannes Berg

From: Johannes Berg <[email protected]>

The net/cfg80211.h header file isn't exported to
userspace, so there's no need for any kind of
__KERNEL__ protection in it. If it was exported,
everything else in it would need protection as
well, not just the logging stuff ...

Quoted 4 lines

---
Might be something that slipped in elsewhere too?

Quoted 5 lines

I thought John was going to remove that guard.

http://lkml.org/lkml/2010/7/27/294

I believe John removed the other one.

Sorry, I must have forgotten... :-(

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.