lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdUqvotuuj6p7SNVo3X+BRvc0MAeQ9krLnJVQywr6rzOKg@mail.gmail.com>
Date: Thu, 15 Feb 2024 11:44:34 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Andy Shevchenko <andy@...nel.org>, Rob Herring <robh+dt@...nel.org>, 
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>, 
	Robin van der Gracht <robin@...tonic.nl>, Paul Burton <paulburton@...nel.org>
Subject: Re: [PATCH v2 12/15] auxdisplay: ht16k33: Switch to use line display
 character mapping

Hi Andy,

On Mon, Feb 12, 2024 at 6:04 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
> Since line display library supports necessary bits to map the characters
> (if required), switch this driver to use that.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

Thanks for your patch!

Reviewed-by: Geert Uytterhoeven <geert@...ux-m68k.org>

Minor nits below.

> --- a/drivers/auxdisplay/ht16k33.c
> +++ b/drivers/auxdisplay/ht16k33.c
> @@ -445,18 +413,20 @@ static void ht16k33_seg7_update(struct work_struct *work)
>         struct ht16k33_priv *priv = container_of(work, struct ht16k33_priv,
>                                                  work.work);
>         struct ht16k33_seg *seg = &priv->seg;
> +       struct linedisp *linedisp = &seg->linedisp;
> +       struct linedisp_map *map = linedisp->map;

struct linedisp_map *map = seg.linedisp->map;

as linedisp is not used below.

>         char *s = seg->curr;
>         uint8_t buf[9];
>
> -       buf[0] = map_to_seg7(&seg->map.seg7, *s++);
> +       buf[0] = map_to_seg7(&map->map.seg7, *s++);
>         buf[1] = 0;
> -       buf[2] = map_to_seg7(&seg->map.seg7, *s++);
> +       buf[2] = map_to_seg7(&map->map.seg7, *s++);
>         buf[3] = 0;
>         buf[4] = 0;
>         buf[5] = 0;
> -       buf[6] = map_to_seg7(&seg->map.seg7, *s++);
> +       buf[6] = map_to_seg7(&map->map.seg7, *s++);
>         buf[7] = 0;
> -       buf[8] = map_to_seg7(&seg->map.seg7, *s++);
> +       buf[8] = map_to_seg7(&map->map.seg7, *s++);
>
>         i2c_smbus_write_i2c_block_data(priv->client, 0, ARRAY_SIZE(buf), buf);
>  }
> @@ -466,17 +436,39 @@ static void ht16k33_seg14_update(struct work_struct *work)
>         struct ht16k33_priv *priv = container_of(work, struct ht16k33_priv,
>                                                  work.work);
>         struct ht16k33_seg *seg = &priv->seg;
> +       struct linedisp *linedisp = &seg->linedisp;
> +       struct linedisp_map *map = linedisp->map;

Likewise.

>         char *s = seg->curr;
>         uint8_t buf[8];
>
> -       put_unaligned_le16(map_to_seg14(&seg->map.seg14, *s++), buf);
> -       put_unaligned_le16(map_to_seg14(&seg->map.seg14, *s++), buf + 2);
> -       put_unaligned_le16(map_to_seg14(&seg->map.seg14, *s++), buf + 4);
> -       put_unaligned_le16(map_to_seg14(&seg->map.seg14, *s++), buf + 6);
> +       put_unaligned_le16(map_to_seg14(&map->map.seg14, *s++), buf + 0);
> +       put_unaligned_le16(map_to_seg14(&map->map.seg14, *s++), buf + 2);
> +       put_unaligned_le16(map_to_seg14(&map->map.seg14, *s++), buf + 4);
> +       put_unaligned_le16(map_to_seg14(&map->map.seg14, *s++), buf + 6);
>
>         i2c_smbus_write_i2c_block_data(priv->client, 0, ARRAY_SIZE(buf), buf);
>  }

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68korg

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ