]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
staging: rtl8712: r8712_xmit_classifier(): Change return values and type
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Thu, 8 Aug 2019 06:40:12 +0000 (12:10 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Aug 2019 17:58:15 +0000 (19:58 +0200)
Change return values of r8712_xmit_classifier from _SUCCESS and _FAIL to
0 and -EINVAL respectively.
Modify call site to check for non-zero return values instead of _FAIL.
Change return type from sint to int.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20190808064012.12661-10-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl8712_xmit.c
drivers/staging/rtl8712/rtl871x_xmit.c
drivers/staging/rtl8712/rtl871x_xmit.h

index dac79e6dcdcbc5f3cacef42dd4798d657e322a2d..3334b03c25481bba52c627096cfb1545953c4e35 100644 (file)
@@ -750,7 +750,7 @@ int r8712_xmit_direct(struct _adapter *padapter, struct xmit_frame *pxmitframe)
 
 int r8712_xmit_enqueue(struct _adapter *padapter, struct xmit_frame *pxmitframe)
 {
-       if (r8712_xmit_classifier(padapter, pxmitframe) == _FAIL) {
+       if (r8712_xmit_classifier(padapter, pxmitframe)) {
                pxmitframe->pkt = NULL;
                return _FAIL;
        }
index 0a26d71e5340267686178f6aeaa224ee897a34ba..f625fd5b9eb3a9434743a6759857072dd357b8e0 100644 (file)
@@ -894,8 +894,8 @@ static inline struct tx_servq *get_sta_pending(struct _adapter *padapter,
  * Will enqueue pxmitframe to the proper queue, and indicate it
  * to xx_pending list.....
  */
-sint r8712_xmit_classifier(struct _adapter *padapter,
-                          struct xmit_frame *pxmitframe)
+int r8712_xmit_classifier(struct _adapter *padapter,
+                         struct xmit_frame *pxmitframe)
 {
        unsigned long irqL0;
        struct  __queue *pstapending;
@@ -920,7 +920,7 @@ sint r8712_xmit_classifier(struct _adapter *padapter,
                }
        }
        if (psta == NULL)
-               return _FAIL;
+               return -EINVAL;
        ptxservq = get_sta_pending(padapter, &pstapending,
                   psta, pattrib->priority);
        spin_lock_irqsave(&pstapending->lock, irqL0);
@@ -929,7 +929,7 @@ sint r8712_xmit_classifier(struct _adapter *padapter,
        list_add_tail(&pxmitframe->list, &ptxservq->sta_pending.queue);
        ptxservq->qcnt++;
        spin_unlock_irqrestore(&pstapending->lock, irqL0);
-       return _SUCCESS;
+       return 0;
 }
 
 static void alloc_hwxmits(struct _adapter *padapter)
index c5c55967164bfb28e25f2e924d47518b81d2d3c8..d4bc059e6a42f5b0b34107974f0c7c98e69d254c 100644 (file)
@@ -258,8 +258,8 @@ void r8712_free_xmitframe(struct xmit_priv *pxmitpriv,
                          struct xmit_frame *pxmitframe);
 void r8712_free_xmitframe_queue(struct xmit_priv *pxmitpriv,
                                struct  __queue *pframequeue);
-sint r8712_xmit_classifier(struct _adapter *padapter,
-                           struct xmit_frame *pxmitframe);
+int r8712_xmit_classifier(struct _adapter *padapter,
+                         struct xmit_frame *pxmitframe);
 sint r8712_xmitframe_coalesce(struct _adapter *padapter, _pkt *pkt,
                              struct xmit_frame *pxmitframe);
 sint _r8712_init_hw_txqueue(struct hw_txqueue *phw_txqueue, u8 ac_tag);