All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sean Young <sean@mess.org>, Willy Tarreau <w@1wt.eu>,
	Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH 1/5] auxdisplay: charlcd: no need to call charlcd_gotoxy() if nothing changes
Date: Mon, 12 Feb 2018 18:30:16 +0100	[thread overview]
Message-ID: <CANiq72ny6ySP9kdL8GY9TRwA+MSxMpwxBk0cDZuEpy36w+srkA@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdVXWQ4JzFAy52-o7CcyO2pz-f7eF0q2kYWvE8kJL_Q_Bw@mail.gmail.com>

On Mon, Feb 12, 2018 at 2:59 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> On Mon, Feb 12, 2018 at 2:42 PM, Miguel Ojeda
> <miguel.ojeda.sandonis@gmail.com> wrote:
>> On Mon, Jan 15, 2018 at 10:58 AM, Sean Young <sean@mess.org> wrote:
>>> If the line extends beyond the width to the screen, nothing changes. The
>>> existing code will call charlcd_gotoxy every time for this case.
>>>
>>> Signed-off-by: Sean Young <sean@mess.org>
>>> ---
>>>  drivers/auxdisplay/charlcd.c | 7 ++++---
>>>  1 file changed, 4 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c
>>> index 642afd88870b..45ec5ce697c4 100644
>>> --- a/drivers/auxdisplay/charlcd.c
>>> +++ b/drivers/auxdisplay/charlcd.c
>>> @@ -192,10 +192,11 @@ static void charlcd_print(struct charlcd *lcd, char c)
>>>                         c = lcd->char_conv[(unsigned char)c];
>>>                 lcd->ops->write_data(lcd, c);
>>>                 priv->addr.x++;
>>> +
>>> +               /* prevents the cursor from wrapping onto the next line */
>>> +               if (priv->addr.x == lcd->bwidth)
>>> +                       charlcd_gotoxy(lcd);
>>>         }
>>> -       /* prevents the cursor from wrapping onto the next line */
>>> -       if (priv->addr.x == lcd->bwidth)
>>> -               charlcd_gotoxy(lcd);
>>>  }
>>>
>>
>> Willy, Geert: is this fine with you? Seems fine: charlcd_write_char()
>> right now does an unconditional write_cmd() when writing a normal
>> character; so unless some HW requires the command for some reason even
>> if there is nothing changed, we can skip it.
>
> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
>

Thanks a lot, picking it up then.

Miguel

> 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

  reply	other threads:[~2018-02-12 17:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15  9:58 [PATCH 0/5] new driver for Ahanix D.Vine 5 IR/VFD Sean Young
2018-01-15  9:58 ` [PATCH 1/5] auxdisplay: charlcd: no need to call charlcd_gotoxy() if nothing changes Sean Young
2018-02-12 13:42   ` Miguel Ojeda
2018-02-12 13:59     ` Geert Uytterhoeven
2018-02-12 17:30       ` Miguel Ojeda [this message]
2018-01-15  9:58 ` [PATCH 2/5] auxdisplay: charlcd: add flush function Sean Young
2018-02-12 20:44   ` Miguel Ojeda
2018-02-13 13:47     ` Andy Shevchenko
2018-01-15  9:58 ` [PATCH 3/5] auxdisplay: charlcd: add escape sequence for brightness on NEC µPD16314 Sean Young
2018-02-12 11:56   ` Miguel Ojeda
2018-02-13 17:34     ` Sean Young
2018-01-15  9:58 ` [PATCH 4/5] media: rc: add keymap for Dign Remote Sean Young
2018-01-15  9:58 ` [PATCH 5/5] media: rc: new driver for Sasem Remote Controller VFD/IR Sean Young

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=CANiq72ny6ySP9kdL8GY9TRwA+MSxMpwxBk0cDZuEpy36w+srkA@mail.gmail.com \
    --to=miguel.ojeda.sandonis@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sean@mess.org \
    --cc=w@1wt.eu \
    /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.