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:   Mon, 28 Mar 2022 23:32:44 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Paul Lemmermann <thepaulodoom@...paulodoom.com>
Cc:     Jonathan Cameron <jic23@...nel.org>,
        linux-iio <linux-iio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] IIO: accel: fixed coding style issues

On Mon, Mar 28, 2022 at 7:45 PM Paul Lemmermann
<thepaulodoom@...paulodoom.com> wrote:
>
> Fixed case statement issues and spacing issues.

...

>                         switch (val[j]) {
> -                       case -1: str = "-1"; break;
> -                       case 0:  str = "0";  break;
> -                       case 1:  str = "1";  break;
> -                       default: goto unknown_format;
> +                       case -1:
> +                               str = "-1";
> +                               break;
> +                       case 0:
> +                               str = "0";
> +                               break;
> +                       case 1:
> +                               str = "1";
> +                               break;
> +                       default:
> +                               goto unknown_format;
>                         }

What you cited from documentation mostly affects the new code, but
this code is already in the kernel and modifying it, esp. taking into
account 3x LOCs count, looks like an unneeded churn, even if
documentation thinks otherwise.

What I could acknowledge from your proposal is the default case.
Otherwise just leave it to the point if we touch this code for
something else in the future.

...

>  static const struct of_device_id kxsd9_of_match[] = {
> -        { .compatible = "kionix,kxsd9" },
> -        { },
> +       { .compatible = "kionix,kxsd9" },

> +       { },

I dunno why you touched this line (likely TABs vs. spaces), but please
remove the comma as well here.

>  };

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ