From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Len Baker <len.baker@gmx.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Phil Reid <preid@electromag.com.au>,
DRI Development <dri-devel@lists.freedesktop.org>,
Linux Fbdev development list <linux-fbdev@vger.kernel.org>,
linux-staging@lists.linux.dev,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 3/3] staging/fbtft: Fix braces coding style
Date: Sat, 24 Jul 2021 20:01:53 +0200 [thread overview]
Message-ID: <CAMuHMdX6PUr0irndogg=Aa+AFDdiDJMeMWM74mLBkuLrW+zWng@mail.gmail.com> (raw)
In-Reply-To: <20210724151411.9531-4-len.baker@gmx.com>
Hi Len,
On Sat, Jul 24, 2021 at 7:44 PM Len Baker <len.baker@gmx.com> wrote:
> Add braces to the "for" loop and remove braces from the "if" statement.
> This way the kernel coding style is followed.
>
> Signed-off-by: Len Baker <len.baker@gmx.com>
Thanks for your patch!
> --- a/drivers/staging/fbtft/fbtft-core.c
> +++ b/drivers/staging/fbtft/fbtft-core.c
> @@ -1016,10 +1018,9 @@ int fbtft_init_display(struct fbtft_par *par)
>
> i = 0;
> while (i < FBTFT_MAX_INIT_SEQUENCE) {
> - if (par->init_sequence[i] == -3) {
> - /* done */
> - return 0;
> - }
These braces should not be removed, due to the presence of
the comment.
> + if (par->init_sequence[i] == -3)
> + return 0; /* done */
> +
> if (par->init_sequence[i] >= 0) {
> dev_err(par->info->device,
> "missing delimiter at position %d\n", i);
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2021-07-24 18:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-24 15:14 [PATCH v2 0/3] Remove all strcpy() uses Len Baker
2021-07-24 15:14 ` [PATCH v2 1/3] staging/fbtft: " Len Baker
2021-07-24 20:21 ` Andy Shevchenko
2021-07-25 13:58 ` Len Baker
2021-07-25 18:51 ` Andy Shevchenko
2021-07-31 13:43 ` Len Baker
2021-07-24 15:14 ` [PATCH v2 2/3] staging/fbtft: Remove unnecessary variable initialization Len Baker
2021-07-24 15:14 ` [PATCH v2 3/3] staging/fbtft: Fix braces coding style Len Baker
2021-07-24 18:01 ` Geert Uytterhoeven [this message]
2021-07-25 14:02 ` Len Baker
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='CAMuHMdX6PUr0irndogg=Aa+AFDdiDJMeMWM74mLBkuLrW+zWng@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=len.baker@gmx.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=preid@electromag.com.au \
/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).