Thread (37 messages) 37 messages, 3 authors, 2021-06-15

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

From: Phillip Potter <phil@philpotter.co.uk>
Date: 2021-06-15 21:08:24
Also in: lkml

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:
quoted
@@ -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
quoted
 
 				/* 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help