Messages in this thread | | | From | Javier Martinez Canillas <> | Subject | Re: [PATCH 3/8] drm/ssd13xx: Replace .page_height field in device info with a constant | Date | Wed, 11 Oct 2023 10:33:54 +0200 |
| |
Geert Uytterhoeven <geert@linux-m68k.org> writes:
Hello Geert,
Thanks a lot for your feedback.
> On Mon, Oct 9, 2023 at 8:36 PM Javier Martinez Canillas > <javierm@redhat.com> wrote:
[...]
>> u32 array_idx = 0;
[...]
>> >> for (k = 0; k < m; k++) { >> - u8 byte = buf[(8 * i + k) * line_length + j / 8]; >> + u32 idx = (page_height * i + k) * line_length + j / 8; > > Nit: I would use unsigned int for idx, as that matches all other > variables involved. > But given array_idx is u32, too, u32 may makes sense. >
Yes, this function logic is mostly based on ssd1307fb_update_rect() from drivers/video/fbdev/ssd1307fb.c and that is from where the u32 array_idx comes from.
As you said, I used u32 for idx to be consistent with that variable type.
>> + u8 byte = buf[idx]; >> u8 bit = (byte >> (j % 8)) & 1; >> >> data |= bit << k; > > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> >
Thanks!
-- Best regards,
Javier Martinez Canillas Core Platforms Red Hat
| |