Commit 9106c8c7 authored by Phillip Potter's avatar Phillip Potter Committed by Greg Kroah-Hartman
Browse files

staging: r8188eu: remove rtw_sctx_chk_waring_status function



Remove the rtw_sctx_chk_waring_status function from core/rtw_amit.c,
as it has only one caller which is unnecessary.

Suggested-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarPhillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220216010709.791-14-phil@philpotter.co.uk


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fee26e22
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -2125,25 +2125,9 @@ int rtw_sctx_wait(struct submit_ctx *sctx)
	return ret;
}

static bool rtw_sctx_chk_waring_status(int status)
{
	switch (status) {
	case RTW_SCTX_DONE_UNKNOWN:
	case RTW_SCTX_DONE_BUF_ALLOC:
	case RTW_SCTX_DONE_BUF_FREE:

	case RTW_SCTX_DONE_DRV_STOP:
	case RTW_SCTX_DONE_DEV_REMOVE:
		return true;
	default:
		return false;
	}
}

void rtw_sctx_done_err(struct submit_ctx **sctx, int status)
{
	if (*sctx) {
		rtw_sctx_chk_waring_status(status);
		(*sctx)->status = status;
		complete(&((*sctx)->done));
		*sctx = NULL;