Commit 1c8a4f7c authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Greg Kroah-Hartman
Browse files

staging: rtl8712: Remove while loop and check_cmd_fifo()



Remove while loop as it only runs while the function check_cmd_fifo
returns _FAIL, whereas check_cmd_fifo always returns _SUCCESS (and hence
this loop will never run).
Remove now unused function check_cmd_fifo.

Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190808064012.12661-9-nishkadg.linux@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 02433a24
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -263,11 +263,6 @@ static struct cmd_obj *cmd_hdl_filter(struct _adapter *padapter,
	return pcmd_r; /* if returning pcmd_r == NULL, pcmd must be free. */
}

static u8 check_cmd_fifo(struct _adapter *padapter, uint sz)
{
	return _SUCCESS;
}

u8 r8712_fw_cmd(struct _adapter *pAdapter, u32 cmd)
{
	int pollingcnts = 50;
@@ -359,13 +354,6 @@ _next:
					       (pcmdpriv->cmd_seq << 24));
			pcmdbuf += 2; /* 8 bytes alignment */
			memcpy((u8 *)pcmdbuf, pcmd->parmbuf, pcmd->cmdsz);
			while (check_cmd_fifo(padapter, wr_sz) == _FAIL) {
				if (padapter->driver_stopped ||
				    padapter->surprise_removed)
					break;
				msleep(100);
				continue;
			}
			if (blnPending)
				wr_sz += 8;   /* Append 8 bytes */
			r8712_write_mem(padapter, RTL8712_DMA_H2CCMD, wr_sz,