Re: [PATCH v4 17/18] staging: r8188eu: Shorten calls chain of rtw_read8/16/32()

From: Dan Carpenter
Date: Tue Sep 14 2021 - 09:02:12 EST


On Tue, Sep 14, 2021 at 02:55:45PM +0200, Fabio M. De Francesco wrote:
> On Tuesday, September 14, 2021 11:32:58 AM CEST Dan Carpenter wrote:
> > On Mon, Sep 13, 2021 at 08:10:01PM +0200, Fabio M. De Francesco wrote:
> > > + if (status == (-ESHUTDOWN || -ENODEV || -ENOENT)) {
> >
> > if (status == -ESHUTDOWN ||
> > status == -ENODEV ||
> > status == -ENOENT) {
>
> This is a stupid mistake and Pavel soon noticed it. Yesterday I sent a
> message to ask reviewers for disregarding v4 and wait for v5 with the fix of
> this test. :(

There wasn't enough information in the email to know what issue you had
seen. I had already started reviewing it when I saw the email.

>
> However, I noticed that usb_control_msg_recv() might return in "status" some
> recoverable errors (like -ENOMEM and others); so I guess that the code must
> retry in a while loop (exactly as it did with usb_control_msg() in
> usbctrl_vendorreq()).

I would not add a while loop unless testing shows it is required.

regards,
dan carpenter