linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Ben Moore <benmoore422@gmail.com>
Cc: trivial@kernel.org, willy@haproxy.com,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drivers/auxdisplay: TRIVIAl removed unnessecary braces from if statements
Date: Sun, 23 Sep 2018 17:33:15 +0200	[thread overview]
Message-ID: <CANiq72ncdwQi1HC+2pcs+HOep-9_mrG=W4UExz0Dmni9V3A9Cg@mail.gmail.com> (raw)
In-Reply-To: <20180923143344.2709-1-benmoore422@gmail.com>

Hi Ben,

On Sun, Sep 23, 2018 at 4:33 PM,  <benmoore422@gmail.com> wrote:
> From: Ben Moore <benmoore422@gmail.com>
>
> removed braches from single line if statements
>
> Signed-off-by: Ben Moore <benmoore422@gmail.com>
> ---
>  drivers/auxdisplay/panel.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
> index 3b25a643058c..0e4a7260dcc0 100644
> --- a/drivers/auxdisplay/panel.c
> +++ b/drivers/auxdisplay/panel.c
> @@ -695,11 +695,10 @@ static void lcd_send_serial(int byte)
>         for (bit = 0; bit < 8; bit++) {
>                 clear_bit(LCD_BIT_CL, bits);    /* CLK low */
>                 panel_set_bits();
> -               if (byte & 1) {
> +               if (byte & 1)
>                         set_bit(LCD_BIT_DA, bits);
> -               } else {
> +               else
>                         clear_bit(LCD_BIT_DA, bits);
> -               }
>
>                 panel_set_bits();
>                 udelay(2);  /* maintain the data during 2 us before CLK up */
> @@ -1025,9 +1024,8 @@ static void lcd_init(void)
>                         lcd.pins.rs = DEFAULT_LCD_PIN_RS;
>                 if (lcd.pins.rw == PIN_NOT_SET)
>                         lcd.pins.rw = DEFAULT_LCD_PIN_RW;
> -       } else {
> +       } else
>                 charlcd->ops = &charlcd_tilcd_ops;
> -       }
>
>         if (lcd.pins.bl == PIN_NOT_SET)
>                 lcd.pins.bl = DEFAULT_LCD_PIN_BL;
> --
> 2.11.0
>

A few more things (Ben's first patch, sent to me first in private):

  * The subject could be better as:

    [PATCH TRIVIAL] auxdisplay: remove unnecessary braces

    i.e. TRIVIAL inside the [...] (which will not appear in the Git
commit message); unnessecary -> unnecessary; drivers/auxdisplay ->
auxdisplay

  * The commit message body ("removed braches from single line if
statements") is redundant with the title of the commit (and has the
typo "braches"). You could say, instead, say something like "No
functional changes."; or if you tested that it generates the same
object file, something like "Tested, no codegen changes."; etc.

  * You can remove the "From:" line.

  * I think Willy uses the w@1wt.eu address nowadays.

  * It would be great if you can try to look for similar instances in
drivers/auxdisplay/* and send a v2 of the patch (you would need to say
in the subject "[PATCH v2 TRIVIAL]").

  * Don't forget to Cc the general linux-kernel mailing list, please!

Thank again for the patch and welcome to the kernel!

[Jiri, I can pick the v2 of this in my tree if you prefer.]

Cheers,
Miguel

       reply	other threads:[~2018-09-23 15:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180923143344.2709-1-benmoore422@gmail.com>
2018-09-23 15:33 ` Miguel Ojeda [this message]
2018-09-23 17:12   ` [PATCH] drivers/auxdisplay: TRIVIAl removed unnessecary braces from if statements Geert Uytterhoeven

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='CANiq72ncdwQi1HC+2pcs+HOep-9_mrG=W4UExz0Dmni9V3A9Cg@mail.gmail.com' \
    --to=miguel.ojeda.sandonis@gmail.com \
    --cc=benmoore422@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@kernel.org \
    --cc=willy@haproxy.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 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).