From 340c0469911cb8394d62399d6fcf6f94e30fe2f4 Mon Sep 17 00:00:00 2001 From: Bhumika Goyal Date: Thu, 6 Oct 2016 23:32:20 +0530 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8712/osdep_service.h | 9 --------- drivers/staging/rtl8712/rtl871x_mlme.h | 18 ------------------ drivers/staging/rtl8712/rtl871x_xmit.h | 6 ------ 3 files changed, 33 deletions(-) diff --git a/drivers/staging/rtl8712/osdep_service.h b/drivers/staging/rtl8712/osdep_service.h index c9ea50daffff..b8a170978434 100644 --- a/drivers/staging/rtl8712/osdep_service.h +++ b/drivers/staging/rtl8712/osdep_service.h @@ -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)) diff --git a/drivers/staging/rtl8712/rtl871x_mlme.h b/drivers/staging/rtl8712/rtl871x_mlme.h index ddaaab058b2f..53a23234c598 100644 --- a/drivers/staging/rtl8712/rtl871x_mlme.h +++ b/drivers/staging/rtl8712/rtl871x_mlme.h @@ -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) { diff --git a/drivers/staging/rtl8712/rtl871x_xmit.h b/drivers/staging/rtl8712/rtl871x_xmit.h index d899d0c6d3a6..40927277f498 100644 --- a/drivers/staging/rtl8712/rtl871x_xmit.h +++ b/drivers/staging/rtl8712/rtl871x_xmit.h @@ -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); -- 2.20.1