[PATCH] staging: rtl8192u: remove unused functions in r8192U_core.c
From: Baoyou Xie
Date: Fri Sep 23 2016 - 09:35:48 EST
We get 2 warnings when building kernel with W=1:
drivers/staging/rtl8192u/r8192U_core.c:925:12: warning: no previous declaration for 'ieeerate2rtlrate' [-Wmissing-declarations]
drivers/staging/rtl8192u/r8192U_core.c:958:12: warning: no previous declaration for 'rtl8192_rate2rate' [-Wmissing-declarations]
drivers/staging/rtl8192u/r8192U_core.c:1322:11: warning: no previous declaration for 'rtl8192_IsWirelessBMode' [-Wmissing-declarations]
In fact, these functions are unused in
r8192U_core.c, but should be removed.
So this patch removes the unused functions.
Signed-off-by: Baoyou Xie <baoyou.xie@xxxxxxxxxx>
---
drivers/staging/rtl8192u/r8192U_core.c | 49 ----------------------------------
1 file changed, 49 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index b86b28a..bc25fb9a 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -922,47 +922,6 @@ void rtl8192_rtx_disable(struct net_device *dev)
skb_queue_purge(&priv->skb_queue);
}
-inline u16 ieeerate2rtlrate(int rate)
-{
- switch (rate) {
- case 10:
- return 0;
- case 20:
- return 1;
- case 55:
- return 2;
- case 110:
- return 3;
- case 60:
- return 4;
- case 90:
- return 5;
- case 120:
- return 6;
- case 180:
- return 7;
- case 240:
- return 8;
- case 360:
- return 9;
- case 480:
- return 10;
- case 540:
- return 11;
- default:
- return 3;
- }
-}
-
-static u16 rtl_rate[] = {10, 20, 55, 110, 60, 90, 120, 180, 240, 360, 480, 540};
-inline u16 rtl8192_rate2rate(short rate)
-{
- if (rate > 11)
- return 0;
- return rtl_rate[rate];
-}
-
-
/* The prototype of rx_isr has changed since one version of Linux Kernel */
static void rtl8192_rx_isr(struct urb *urb)
{
@@ -1319,14 +1278,6 @@ void rtl819xusb_beacon_tx(struct net_device *dev, u16 tx_rate)
}
-inline u8 rtl8192_IsWirelessBMode(u16 rate)
-{
- if (((rate <= 110) && (rate != 60) && (rate != 90)) || (rate == 220))
- return 1;
- else
- return 0;
-}
-
short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb)
{
struct r8192_priv *priv = ieee80211_priv(dev);
--
2.7.4