Skip to contentSkip to conversation

Staging: rtl8192u: Convert use of __constant_<foo> to <foo>

PATCH RESEND New Vaishali Thakkar 1 participant 1 message Mar 11, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 Staging: rtl8192u: Convert use of __constant_<foo> to <foo>

Using functions of the form __constant_<foo> isn't preferred outside of include/uapi/ as using the function without __constant_ is identical when the argument is a constant. So, this patch replaces __constant_htons with htons.

This is done using Coccinelle and semantic patch used for this is as follows:

@@identifier x;@@

(
- __constant_htons(x)
+ htons(x)
|
- __constant_htonl(x)
+ htonl(x)
|
- __constant_ntohs(x)
+ htons(x)
|
- __constant_ntohl(x)
+ htonl(x)
)

---
 drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c +1 -1
index d2c2fb8..bd74510 100644
@@ -55,7 +55,7 @@ static inline void ieee80211_monitor_rx(struct ieee80211_device *ieee,
 
 	skb_pull(skb, ieee80211_get_hdrlen(fc));
 	skb->pkt_type = PACKET_OTHERHOST;
-	skb->protocol = __constant_htons(ETH_P_80211_RAW);
+	skb->protocol = htons(ETH_P_80211_RAW);
 	memset(skb->cb, 0, sizeof(skb->cb));
 	netif_rx(skb);
 }
Signature · 1 line
1.9.1