[PATCH 09/10] staging: rtl8712: Remove while loop and check_cmd_fifo()

Nishka Dasgupta nishkadg.linux at gmail.com
Thu Aug 8 06:40:11 UTC 2019


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: Nishka Dasgupta <nishkadg.linux at gmail.com>
---
 drivers/staging/rtl8712/rtl8712_cmd.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c
index f99fd7cfa445..ff3cb09c57a6 100644
--- a/drivers/staging/rtl8712/rtl8712_cmd.c
+++ b/drivers/staging/rtl8712/rtl8712_cmd.c
@@ -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 @@ int r8712_cmd_thread(void *context)
 					       (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,
-- 
2.19.1



More information about the devel mailing list