Re: [PATCH 22/28] staging: rtl8188eu: remove all DBG_88E calls from hal/usb_halinit.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 15, 2021 at 01:15:01AM +0100, Phillip Potter wrote:
> @@ -1685,8 +1658,6 @@ void rtw_hal_set_hwreg(struct adapter *Adapter, u8 variable, u8 *val)
>  					if (!(usb_read32(Adapter, REG_RXPKT_NUM) & RXDMA_IDLE))
>  						break;
>  				} while (trycnt--);
> -				if (trycnt == 0)
> -					DBG_88E("Stop RX DMA failed......\n");

Not related to your patch but this loop will exit with trycnt == -1 not
0.

There should be a Smatch warning for this.  Also Smatch doesn't handle
while count down loops very well...  It takes the short cut of
assuming that all do while loops have a break statement.

regards,
dan carpenter

>  
>  				/* RQPN Load 0 */
>  				usb_write16(Adapter, REG_RQPN_NPQ, 0x0);





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux