staging: rtl8712: r8712_free_xmitbuf(): Change return type
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Fri, 9 Aug 2019 05:23:47 +0000 (10:53 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Aug 2019 14:37:15 +0000 (16:37 +0200)
Change return type of r8712_free_xmitbuf from int to void (and remove
its return values) as its return value is never used.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190809052353.5308-5-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_xmit.c
drivers/staging/rtl8712/rtl871x_xmit.h

index 2e63cceff0dafad2c6965107a685509cb3d85d49..178f8b96943b0717b6640ea98727cd7dafb53125 100644 (file)
@@ -753,19 +753,18 @@ struct xmit_buf *r8712_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
        return pxmitbuf;
 }
 
-int r8712_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
+void r8712_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
 {
        unsigned long irqL;
        struct  __queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue;
 
        if (pxmitbuf == NULL)
-               return _FAIL;
+               return;
        spin_lock_irqsave(&pfree_xmitbuf_queue->lock, irqL);
        list_del_init(&pxmitbuf->list);
        list_add_tail(&(pxmitbuf->list), &pfree_xmitbuf_queue->queue);
        pxmitpriv->free_xmitbuf_cnt++;
        spin_unlock_irqrestore(&pfree_xmitbuf_queue->lock, irqL);
-       return _SUCCESS;
 }
 
 /*
index 291763c310baa1e29223e2efd6ce0cff77e9b7db..d4658c1c4bd4a381c2374d487cd268f9c888e89f 100644 (file)
@@ -249,8 +249,8 @@ struct      xmit_priv {
        uint free_xmitbuf_cnt;
 };
 
-int r8712_free_xmitbuf(struct xmit_priv *pxmitpriv,
-                      struct xmit_buf *pxmitbuf);
+void r8712_free_xmitbuf(struct xmit_priv *pxmitpriv,
+                       struct xmit_buf *pxmitbuf);
 struct xmit_buf *r8712_alloc_xmitbuf(struct xmit_priv *pxmitpriv);
 void r8712_update_protection(struct _adapter *padapter, u8 *ie, uint ie_len);
 struct xmit_frame *r8712_alloc_xmitframe(struct xmit_priv *pxmitpriv);