On Mon, Feb 12, 2018 at 2:59 PM, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote: > On Mon, Feb 12, 2018 at 2:42 PM, Miguel Ojeda > <miguel.ojeda.sandonis@xxxxxxxxx> wrote: >> On Mon, Jan 15, 2018 at 10:58 AM, Sean Young <sean@xxxxxxxx> 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@xxxxxxxx> >>> --- >>> 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@xxxxxxxxxxxxxx> > Thanks a lot, picking it up then. Miguel > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx > > 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