mirror of https://gitee.com/openkylin/linux.git
staging: rtl8712: r8712_xmit_classifier(): Change return values and type
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>
This commit is contained in:
parent
1c8a4f7c84
commit
3f411e8c99
|
@ -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)
|
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;
|
pxmitframe->pkt = NULL;
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
* Will enqueue pxmitframe to the proper queue, and indicate it
|
||||||
* to xx_pending list.....
|
* to xx_pending list.....
|
||||||
*/
|
*/
|
||||||
sint r8712_xmit_classifier(struct _adapter *padapter,
|
int r8712_xmit_classifier(struct _adapter *padapter,
|
||||||
struct xmit_frame *pxmitframe)
|
struct xmit_frame *pxmitframe)
|
||||||
{
|
{
|
||||||
unsigned long irqL0;
|
unsigned long irqL0;
|
||||||
struct __queue *pstapending;
|
struct __queue *pstapending;
|
||||||
|
@ -920,7 +920,7 @@ sint r8712_xmit_classifier(struct _adapter *padapter,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (psta == NULL)
|
if (psta == NULL)
|
||||||
return _FAIL;
|
return -EINVAL;
|
||||||
ptxservq = get_sta_pending(padapter, &pstapending,
|
ptxservq = get_sta_pending(padapter, &pstapending,
|
||||||
psta, pattrib->priority);
|
psta, pattrib->priority);
|
||||||
spin_lock_irqsave(&pstapending->lock, irqL0);
|
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);
|
list_add_tail(&pxmitframe->list, &ptxservq->sta_pending.queue);
|
||||||
ptxservq->qcnt++;
|
ptxservq->qcnt++;
|
||||||
spin_unlock_irqrestore(&pstapending->lock, irqL0);
|
spin_unlock_irqrestore(&pstapending->lock, irqL0);
|
||||||
return _SUCCESS;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void alloc_hwxmits(struct _adapter *padapter)
|
static void alloc_hwxmits(struct _adapter *padapter)
|
||||||
|
|
|
@ -258,8 +258,8 @@ void r8712_free_xmitframe(struct xmit_priv *pxmitpriv,
|
||||||
struct xmit_frame *pxmitframe);
|
struct xmit_frame *pxmitframe);
|
||||||
void r8712_free_xmitframe_queue(struct xmit_priv *pxmitpriv,
|
void r8712_free_xmitframe_queue(struct xmit_priv *pxmitpriv,
|
||||||
struct __queue *pframequeue);
|
struct __queue *pframequeue);
|
||||||
sint r8712_xmit_classifier(struct _adapter *padapter,
|
int r8712_xmit_classifier(struct _adapter *padapter,
|
||||||
struct xmit_frame *pxmitframe);
|
struct xmit_frame *pxmitframe);
|
||||||
sint r8712_xmitframe_coalesce(struct _adapter *padapter, _pkt *pkt,
|
sint r8712_xmitframe_coalesce(struct _adapter *padapter, _pkt *pkt,
|
||||||
struct xmit_frame *pxmitframe);
|
struct xmit_frame *pxmitframe);
|
||||||
sint _r8712_init_hw_txqueue(struct hw_txqueue *phw_txqueue, u8 ac_tag);
|
sint _r8712_init_hw_txqueue(struct hw_txqueue *phw_txqueue, u8 ac_tag);
|
||||||
|
|
Loading…
Reference in New Issue