Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: rtl8712: remove unused functions

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>

authored by

Bhumika Goyal and committed by
Greg Kroah-Hartman
340c0469 67f9dcb1

-33
-9
drivers/staging/rtl8712/osdep_service.h
··· 63 63 return (head == plist); 64 64 } 65 65 66 - static inline void sleep_schedulable(int ms) 67 - { 68 - u32 delta; 69 - 70 - delta = msecs_to_jiffies(ms);/*(ms)*/ 71 - set_current_state(TASK_INTERRUPTIBLE); 72 - schedule_timeout(delta); 73 - } 74 - 75 66 static inline void flush_signals_thread(void) 76 67 { 77 68 if (signal_pending(current))
-18
drivers/staging/rtl8712/rtl871x_mlme.h
··· 162 162 spin_unlock_irqrestore(&pmlmepriv->lock, irqL); 163 163 } 164 164 165 - static inline void up_scanned_network(struct mlme_priv *pmlmepriv) 166 - { 167 - unsigned long irqL; 168 - 169 - spin_lock_irqsave(&pmlmepriv->lock, irqL); 170 - pmlmepriv->num_of_scanned++; 171 - spin_unlock_irqrestore(&pmlmepriv->lock, irqL); 172 - } 173 - 174 - static inline void down_scanned_network(struct mlme_priv *pmlmepriv) 175 - { 176 - unsigned long irqL; 177 - 178 - spin_lock_irqsave(&pmlmepriv->lock, irqL); 179 - pmlmepriv->num_of_scanned--; 180 - spin_unlock_irqrestore(&pmlmepriv->lock, irqL); 181 - } 182 - 183 165 static inline void set_scanned_network_val(struct mlme_priv *pmlmepriv, 184 166 sint val) 185 167 {
-6
drivers/staging/rtl8712/rtl871x_xmit.h
··· 261 261 uint free_xmitbuf_cnt; 262 262 }; 263 263 264 - static inline struct __queue *get_free_xmit_queue( 265 - struct xmit_priv *pxmitpriv) 266 - { 267 - return &(pxmitpriv->free_xmit_queue); 268 - } 269 - 270 264 int r8712_free_xmitbuf(struct xmit_priv *pxmitpriv, 271 265 struct xmit_buf *pxmitbuf); 272 266 struct xmit_buf *r8712_alloc_xmitbuf(struct xmit_priv *pxmitpriv);