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

From: Phillip Potter
Date: Tue Jun 15 2021 - 17:08:24 EST


On Tue, Jun 15, 2021 at 03:41:59PM +0300, Dan Carpenter wrote:
> 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);
>

Dear Dan,

Thanks for your feedback, I will try and take a look at this.

Regards,
Phil