Staging: rtl8712: remove unused functions
authorBhumika Goyal <bhumirks@gmail.com>
Thu, 6 Oct 2016 18:02:20 +0000 (23:32 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Oct 2016 08:24:51 +0000 (10:24 +0200)
Remove the functions sleep_schedulable, down_scanned_network,
up_scanned_network and get_free_xmit_queue as they are not used anywhere
in the kernel. Functions detected using coccinelle but changes done by
hand.
Script:

@initialize:python@
@@
def display(name,p):
        print(name,p[0].file)

@r1@
identifier func;
type T;
position p;
@@
static T func@p(...)
{
...
}

@r@
identifier r1.func;
@@
func

@script:python depends on !r@
func << r1.func;
p << r1.p;
@@
display(func,p)

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/osdep_service.h
drivers/staging/rtl8712/rtl871x_mlme.h
drivers/staging/rtl8712/rtl871x_xmit.h

index c9ea50d..b8a1709 100644 (file)
@@ -63,15 +63,6 @@ static inline u32 end_of_queue_search(struct list_head *head,
        return (head == plist);
 }
 
-static inline void sleep_schedulable(int ms)
-{
-       u32 delta;
-
-       delta = msecs_to_jiffies(ms);/*(ms)*/
-       set_current_state(TASK_INTERRUPTIBLE);
-       schedule_timeout(delta);
-}
-
 static inline void flush_signals_thread(void)
 {
        if (signal_pending(current))
index ddaaab0..53a2323 100644 (file)
@@ -162,24 +162,6 @@ static inline void clr_fwstate(struct mlme_priv *pmlmepriv, sint state)
        spin_unlock_irqrestore(&pmlmepriv->lock, irqL);
 }
 
-static inline void up_scanned_network(struct mlme_priv *pmlmepriv)
-{
-       unsigned long irqL;
-
-       spin_lock_irqsave(&pmlmepriv->lock, irqL);
-       pmlmepriv->num_of_scanned++;
-       spin_unlock_irqrestore(&pmlmepriv->lock, irqL);
-}
-
-static inline void down_scanned_network(struct mlme_priv *pmlmepriv)
-{
-       unsigned long irqL;
-
-       spin_lock_irqsave(&pmlmepriv->lock, irqL);
-       pmlmepriv->num_of_scanned--;
-       spin_unlock_irqrestore(&pmlmepriv->lock, irqL);
-}
-
 static inline void set_scanned_network_val(struct mlme_priv *pmlmepriv,
                                             sint val)
 {
index d899d0c..4092727 100644 (file)
@@ -261,12 +261,6 @@ struct     xmit_priv {
        uint free_xmitbuf_cnt;
 };
 
-static inline struct  __queue *get_free_xmit_queue(
-                               struct xmit_priv *pxmitpriv)
-{
-       return &(pxmitpriv->free_xmit_queue);
-}
-
 int r8712_free_xmitbuf(struct xmit_priv *pxmitpriv,
                       struct xmit_buf *pxmitbuf);
 struct xmit_buf *r8712_alloc_xmitbuf(struct xmit_priv *pxmitpriv);