Re: [PATCH RFC 2/3] staging: r8188eu: add error handling to ReadFuse

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

 



On Fri, 20 Aug 2021 at 18:07, Pavel Skripkin <paskripkin@xxxxxxxxx> wrote:
>
> ReadEFuseByte() internally calls rtw_read8() which can fail. To avoid
> uninit value bugs we should properly handle error sutiation and deliver
> the error to caller.
>
> To achieve it, some functions now return an int, and the error
> which could occur in ReadEFuseByte() is handled on the top level.
>
> Signed-off-by: Pavel Skripkin <paskripkin@xxxxxxxxx>
> ---
>  drivers/staging/r8188eu/core/rtw_efuse.c      | 46 +++++++++-----
>  drivers/staging/r8188eu/hal/hal_intf.c        |  6 +-
>  .../staging/r8188eu/hal/rtl8188e_hal_init.c   | 62 +++++++++++++------
>  drivers/staging/r8188eu/hal/usb_halinit.c     | 20 ++++--
>  drivers/staging/r8188eu/hal/usb_ops_linux.c   | 43 +++++++++++--
>  drivers/staging/r8188eu/include/hal_intf.h    |  6 +-
>  .../staging/r8188eu/include/rtl8188e_hal.h    |  2 +-
>  drivers/staging/r8188eu/include/rtw_efuse.h   |  4 +-
>  drivers/staging/r8188eu/os_dep/usb_intf.c     |  4 +-
>  9 files changed, 138 insertions(+), 55 deletions(-)
>

Dear Pavel,

I like the code, just a few things though:
(1) the comments I made in the previous e-mail r.e. what we actually
do with the errors, and grouping logically related changes (the rest
of the usb_read*() changes being in this patch for example).
(2) I got trailing whitespace errors from this patch and the last one.
For a v2 I would say stripping the whitespace is a good idea too - I
have submitted many patches myself to this driver that had whitespace
in - indeed, the original version of my patch series to import the
driver still had a load as well :-)

Regards,
Phil




[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