]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: rtl8712: Remove while loop and check_cmd_fifo()
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Thu, 8 Aug 2019 06:40:11 +0000 (12:10 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Aug 2019 17:58:15 +0000 (19:58 +0200)
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@gmail.com>
Link: https://lore.kernel.org/r/20190808064012.12661-9-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl8712_cmd.c

index f99fd7cfa4450062cf39e6b879d38dc03d99d8d4..ff3cb09c57a63c15432cd7684687eb20f02a5312 100644 (file)
@@ -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,