Re: [PATCH RFC 1/3] staging: r8188eu: add proper rtw_read* error handling

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

 



On Saturday, August 21, 2021 12:35:48 PM CEST Pavel Skripkin wrote:
> On 8/21/21 8:55 AM, Fabio M. De Francesco wrote:
> > On Friday, August 20, 2021 7:07:36 PM CEST Pavel Skripkin wrote:
> >> rtw_read*() functions call usb_read* inside. These functions could fail
> >> in some cases; for example: failed to receive control message. These
> >> cases should be handled to prevent uninit value bugs, since usb_read*
> >> functions blindly return stack variable without checking if this value
> >> _actualy_ initialized.
> >> 
> >> To achive it, all usb_read* and rtw_read*() argument list is expanded
> > 
> > []
> >
> >> --- a/drivers/staging/r8188eu/core/rtw_io.c
> >> +++ b/drivers/staging/r8188eu/core/rtw_io.c
> >> @@ -34,44 +34,44 @@ jackson@xxxxxxxxxxxxxx
> >>  #define rtw_cpu_to_le16(val)		cpu_to_le16(val)
> >>  #define rtw_cpu_to_le32(val)		cpu_to_le32(val)
> > 
> > Not related to your patch, these macros are useless and misleading.
> > 
> 
> Sorry, I don't get it. I didn't touch these macros, it's part of diffstat.

Yes, correct; in fact I wrote: "not related to your patch".

I just saw those macros while reading your patch. The code is  I just noticed 
that those macros are useless (in case someone wanted to
address that issue). 

Obviously, if you find it interesting, you shouldn't do that in your series,
because it is entirely unrelated to the purpose of your work.

I hope now I've made it clearer, sorry.

Regards,

Fabio 






[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