mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
staging: rtl8723bs: make dump_mgntframe_and_wait() return void
The return value of dump_mgntframe_and_wait() is ignored by all current callers. Keep using the return value of rtw_hal_mgnt_xmit() to determine whether to wait for completion. Make dump_mgntframe_and_wait() return void because no caller uses its return value. Suggested-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Link: https://patch.msgid.link/20260731155228.22526-4-dennylin0707@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
64fd99b6fe
commit
4d2e496887
|
|
@ -1971,9 +1971,8 @@ void dump_mgntframe(struct adapter *padapter, struct xmit_frame *pmgntframe)
|
|||
rtw_hal_mgnt_xmit(padapter, pmgntframe);
|
||||
}
|
||||
|
||||
s32 dump_mgntframe_and_wait(struct adapter *padapter, struct xmit_frame *pmgntframe, int timeout_ms)
|
||||
void dump_mgntframe_and_wait(struct adapter *padapter, struct xmit_frame *pmgntframe, int timeout_ms)
|
||||
{
|
||||
s32 ret = _FAIL;
|
||||
unsigned long irqL;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
struct xmit_buf *pxmitbuf = pmgntframe->pxmitbuf;
|
||||
|
|
@ -1983,26 +1982,18 @@ s32 dump_mgntframe_and_wait(struct adapter *padapter, struct xmit_frame *pmgntfr
|
|||
padapter->driver_stopped) {
|
||||
rtw_free_xmitbuf(&padapter->xmitpriv, pmgntframe->pxmitbuf);
|
||||
rtw_free_xmitframe(&padapter->xmitpriv, pmgntframe);
|
||||
return ret;
|
||||
return;
|
||||
}
|
||||
|
||||
rtw_sctx_init(&sctx, timeout_ms);
|
||||
pxmitbuf->sctx = &sctx;
|
||||
|
||||
ret = rtw_hal_mgnt_xmit(padapter, pmgntframe);
|
||||
if (ret)
|
||||
ret = _FAIL;
|
||||
else
|
||||
ret = _SUCCESS;
|
||||
|
||||
if (ret == _SUCCESS)
|
||||
ret = rtw_sctx_wait(&sctx);
|
||||
if (!rtw_hal_mgnt_xmit(padapter, pmgntframe))
|
||||
rtw_sctx_wait(&sctx);
|
||||
|
||||
spin_lock_irqsave(&pxmitpriv->lock_sctx, irqL);
|
||||
pxmitbuf->sctx = NULL;
|
||||
spin_unlock_irqrestore(&pxmitpriv->lock_sctx, irqL);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 dump_mgntframe_and_wait_ack(struct adapter *padapter, struct xmit_frame *pmgntframe)
|
||||
|
|
|
|||
|
|
@ -533,7 +533,7 @@ void update_mgnt_tx_rate(struct adapter *padapter, u8 rate);
|
|||
void update_mgntframe_attrib(struct adapter *padapter, struct pkt_attrib *pattrib);
|
||||
void update_mgntframe_attrib_addr(struct adapter *padapter, struct xmit_frame *pmgntframe);
|
||||
void dump_mgntframe(struct adapter *padapter, struct xmit_frame *pmgntframe);
|
||||
s32 dump_mgntframe_and_wait(struct adapter *padapter, struct xmit_frame *pmgntframe, int timeout_ms);
|
||||
void dump_mgntframe_and_wait(struct adapter *padapter, struct xmit_frame *pmgntframe, int timeout_ms);
|
||||
s32 dump_mgntframe_and_wait_ack(struct adapter *padapter, struct xmit_frame *pmgntframe);
|
||||
|
||||
void issue_beacon(struct adapter *padapter, int timeout_ms);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user