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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 28 Sep 2022 14:31:23 +0200
From:   Thierry Reding <thierry.reding@...il.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     linux-pwm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
Subject: Re: [PATCH v2 2/4] pwm: sysfs: Return directly from the for-loop in
 PM callbacks

On Fri, Aug 26, 2022 at 08:07:14PM +0300, Andy Shevchenko wrote:
> There is no need to assign ret to 0 and then break the loop just
> for returning the error to the caller. Instead, return directly
> from the for-loop, and 0 otherwise.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Acked-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
> ---
> v2: added tag (Uwe)
>  drivers/pwm/sysfs.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

I fail to see how this is an improvement. The outcome is exactly the
same and this doesn't even make the code shorter. Why bother?

Thierry

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ