linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Lemmermann <thepaulodoom@thepaulodoom.com>
To: Andy Shevchenko <andy.shevchenko@gmail.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 16:06:53 -0500	[thread overview]
Message-ID: <YkIjbdICfxBZx3qf@hp-amd-paul> (raw)
In-Reply-To: <CAHp75Vf7R2=m7apZfXkY9-nETNiG7n6oXpivBg-56Wguzx2+8A@mail.gmail.com>

On Mon, Mar 28, 2022 at 11:32:44PM +0300, Andy Shevchenko wrote:
> 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.

Yes, that is exactly why this patch exists.

Thank you, I will take these thoughts into account and submit a new
patch.

Thanks!
Paul
> 
> >  };
> 
> -- 
> With Best Regards,
> Andy Shevchenko

      reply	other threads:[~2022-03-28 21:07 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
2022-03-28 21:06   ` Paul Lemmermann [this message]

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=YkIjbdICfxBZx3qf@hp-amd-paul \
    --to=thepaulodoom@thepaulodoom.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).