summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
diff options
context:
space:
mode:
authorVaishali Thakkar2015-03-06 14:22:28 +0100
committerGreg Kroah-Hartman2015-03-16 15:50:16 +0100
commit6465144c3d19ca1c2f5fb1dd12d0a6496254c85c (patch)
tree78739b45141ce08aba65ac1e8d5a747e546206a2 /drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
parentStaging: rtl8712: Replace __constant_cpu_to_le16 (diff)
downloadkernel-qcow2-linux-6465144c3d19ca1c2f5fb1dd12d0a6496254c85c.tar.gz
kernel-qcow2-linux-6465144c3d19ca1c2f5fb1dd12d0a6496254c85c.tar.xz
kernel-qcow2-linux-6465144c3d19ca1c2f5fb1dd12d0a6496254c85c.zip
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) ) Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c')
-rw-r--r--drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
index d2c2fb82f2fc..bd745109aaee 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
@@ -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);
}