staging: rtl8187se: Deleted rtl8180_len2duration functions in r8180_core.c
authorAna Rey <anarey@gmail.com>
Tue, 25 Feb 2014 13:36:33 +0000 (14:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Feb 2014 20:16:50 +0000 (12:16 -0800)
After the next warning messages by sparse tools:

drivers/staging/rtl8187se/r8180_core.c:1621:5: warning: symbol 'rtl8180_len2duration' was not declared. Should it be static?
drivers/staging/rtl8187se/r8180_core.c:1621:12: warning: ‘rtl8180_len2duration’ defined but not used [-Wunused-function]
 static u16 rtl8180_len2duration(u32 len, short rate, short *ext)
            ^

And the next search:
$ grep -ir rtl8180_len2duration ./*
./r8180_core.c:u16 rtl8180_len2duration(u32 len, short rate, short *ext)
Binary file ./r8187se.ko matches
Binary file ./r8187se.o matches

I decided to delete rtl8180_len2duration function.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8187se/r8180_core.c

index 6cafee22bec4fecb7842c53ae28fb8c3427afe8b..42c1ee324d2fe13d11fce7a0f026479a537c36d7 100644 (file)
@@ -1613,55 +1613,6 @@ static int rtl8180_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
        return NETDEV_TX_OK;
 }
 
-/* longpre 144+48 shortpre 72+24 */
-u16 rtl8180_len2duration(u32 len, short rate, short *ext)
-{
-       u16 duration;
-       u16 drift;
-       *ext = 0;
-
-       switch (rate) {
-       case 0: /* 1mbps */
-               *ext = 0;
-               duration = ((len+4)<<4) / 0x2;
-               drift = ((len+4)<<4) % 0x2;
-               if (drift == 0)
-                       break;
-               duration++;
-               break;
-       case 1: /* 2mbps */
-               *ext = 0;
-               duration = ((len+4)<<4) / 0x4;
-               drift = ((len+4)<<4) % 0x4;
-               if (drift == 0)
-                       break;
-               duration++;
-               break;
-       case 2: /* 5.5mbps */
-               *ext = 0;
-               duration = ((len+4)<<4) / 0xb;
-               drift = ((len+4)<<4) % 0xb;
-               if (drift == 0)
-                       break;
-               duration++;
-               break;
-       default:
-       case 3: /* 11mbps */
-               *ext = 0;
-               duration = ((len+4)<<4) / 0x16;
-               drift = ((len+4)<<4) % 0x16;
-               if (drift == 0)
-                       break;
-               duration++;
-               if (drift > 6)
-                       break;
-               *ext = 1;
-               break;
-       }
-
-       return duration;
-}
-
 static void rtl8180_prepare_beacon(struct net_device *dev)
 {
        struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);