All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Paul Lemmermann <thepaulodoom@thepaulodoom.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	linux-iio <linux-iio@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] IIO: accel: fixed coding style issues
Date: Mon, 28 Mar 2022 23:32:44 +0300	[thread overview]
Message-ID: <CAHp75Vf7R2=m7apZfXkY9-nETNiG7n6oXpivBg-56Wguzx2+8A@mail.gmail.com> (raw)
In-Reply-To: <YkHOpCT2Gad1YaxN@hp-amd-paul>

On Mon, Mar 28, 2022 at 7:45 PM Paul Lemmermann
<thepaulodoom@thepaulodoom.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

  parent reply	other threads:[~2022-03-28 20:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28 15:05 [PATCH] IIO: accel: fixed coding style issues Paul Lemmermann
2022-03-28 17:06 ` Jonathan Cameron
2022-03-28 19:17   ` Paul Lemmermann
2022-04-02 16:35     ` Jonathan Cameron
2022-03-28 20:32 ` Andy Shevchenko [this message]
2022-03-28 21:06   ` Paul Lemmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHp75Vf7R2=m7apZfXkY9-nETNiG7n6oXpivBg-56Wguzx2+8A@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thepaulodoom@thepaulodoom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.