lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1651213.ETx7SW4KbR@localhost.localdomain>
Date:   Fri, 13 Aug 2021 01:11:19 +0200
From:   "Fabio M. De Francesco" <fmdefrancesco@...il.com>
To:     Nathan Chancellor <nathan@...nel.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Phillip Potter <phil@...lpotter.co.uk>,
        Larry Finger <Larry.Finger@...inger.net>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
        clang-built-linux@...glegroups.com
Subject: Re: [PATCH 3/3] staging: r8188eu: Reorganize error handling in rtw_drv_init()

On Thursday, August 12, 2021 10:40:27 PM CEST Nathan Chancellor wrote:
> [...]
> Looking at the error function as a whole, the error handling is odd
> compared to the rest of the kernel, which prefers to set error codes on
> goto paths, rather than a global "status" variable which determines the
> error code at the end of the function and function calls in the case of
> error.
>
"status" is not a global variable, instead it is a local variable with only 
in-function visibility and it has an automatic storage duration (i.e., it is 
allocated on the stack frame of the function and is destroyed when the stack 
is unwound at the return from the function). 

According to the above definition there's no difference in storage classes  
between the old "status" and the new "ret" (the latter being a merely rename 
of the former). However, "ret" is a more appropriate name for that variable.
Furthermore, your handling of errors and return value is more consistent with 
best practices. 

Therefore, apart that minor misuse of the "global" class in your commit 
message, it's a nice work and so...

Acked-by: Fabio M. De Francesco <fmdefrancesco@...il.com>

Regards,

Fabio
>
> [...]
> 
> Signed-off-by: Nathan Chancellor <nathan@...nel.org>
> ---
>  drivers/staging/r8188eu/os_dep/usb_intf.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> [...]
>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ