staging: rtl8192u: remove unused functions in r8192U_core.c
authorBaoyou Xie <baoyou.xie@linaro.org>
Fri, 23 Sep 2016 13:35:22 +0000 (21:35 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Sep 2016 17:00:44 +0000 (19:00 +0200)
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@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/r8192U_core.c

index c66e7cf608c0d3777f6a27db4510486588edf82c..457eeb5f5239d502c8407c692d9a0ef2df90bf48 100644 (file)
@@ -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);