staging: rtl8723bs: make rtl8723_dequeue_writeport() return bool
PATCH 1/1 staging: rtl8723bs: make rtl8723_dequeue_writeport() return bool
rtl8723_dequeue_writeport() returns boolean state and its caller uses the return value as a boolean.
Change the return type to bool and replace _FAIL with false. Also use bool for the caller's queue_empty variable.
No functional change.
--- drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +4 -3
@@ -33,7 +33,7 @@ static u8 rtw_sdio_wait_enough_TxOQT_space(struct adapter *padapter, u8 agg_num)return true; } -static s32 rtl8723_dequeue_writeport (struct adapter *padapter) +static bool rtl8723_dequeue_writeport (struct adapter *padapter) {struct mlme_priv *pmlmepriv = &padapter->mlmepriv;struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
@@ -107,7 +107,7 @@ static s32 rtl8723_dequeue_writeport(struct adapter *padapter)/* pxmitbuf->priv_data = NULL; */ rtw_free_xmitbuf (pxmitpriv, pxmitbuf); -return _FAIL; +return false; }/*
@@ -121,7 +121,8 @@ static s32 rtl8723_dequeue_writeport(struct adapter *padapter)s32 rtl8723bs_xmit_buf_handler (struct adapter *padapter) {struct xmit_priv *pxmitpriv = &padapter->xmitpriv; -u8 queue_empty, queue_pending; +bool queue_empty; +u8 queue_pending;s32 ret;if (wait_for_completion_interruptible (&pxmitpriv->xmit_comp)) {
Signature · 1 line
2.43.0
Greg Kroah-Hartman
maintainerQuoted 18 lines · Hungyu Lin
rtl8723_dequeue_writeport()returns boolean state and its caller uses the return value as a boolean.Change the return type to bool and replace
_FAILwith false. Also use bool for the caller'squeue_emptyvariable.No functional change.
Signed-off-by Hungyu Lin <[email protected]>--- drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +0
-0
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c static u8 rtw_sdio_wait_enough_TxOQT_space(struct adapter *padapter, u8 agg_num) · line 36
Quoted 5 lines
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +1
-1@@ -33,7 +33,7 @@ static u8 rtw_sdio_wait_enough_TxOQT_space(struct adapter *padapter, u8 agg_num)return true; } -static s32 rtl8723_dequeue_writeport (struct adapter *padapter) +static bool rtl8723_dequeue_writeport (struct adapter *padapter)
Please change the variable that is assigned to the output of this function as well.
thanks,
greg k-h
Quoted 2 lines
Please change the variable that is assigned to the output of this function as well.
I changed queue_empty, which receives the return value of rtl8723_dequeue_writeport(), from u8 to bool later in the patch:
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c static s32 rtl8723_dequeue_writeport(struct adapter *padapter) · line 125
Quoted 3 lines
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +2
-1-u8 queue_empty, queue_pending; +bool queue_empty; +u8 queue_pending;
Were you referring to a different variable?
Thanks,
Hungyu Lin
Greg Kroah-Hartman
maintainerQuoted 11 lines · Hungyu Lin
Quoted 2 lines
Please change the variable that is assigned to the output of this function as well.
I changed
queue_empty, which receives the return value ofrtl8723_dequeue_writeport(), from u8 to bool later in the patch:drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c static s32 rtl8723_dequeue_writeport(struct adapter *padapter) · line 125
Quoted 3 lines
drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +2
-1-u8 queue_empty, queue_pending; +bool queue_empty; +u8 queue_pending;Were you referring to a different variable?
Ah, missed that, can you please resend?
thanks.
greg k-h