Re: [PATCH 3/8] drm/ssd13xx: Replace .page_height field in device info with a constant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> writes:

Hello Geert,

Thanks a lot for your feedback.

> On Mon, Oct 9, 2023 at 8:36 PM Javier Martinez Canillas
> <javierm@xxxxxxxxxx> 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@xxxxxxxxx>
>

Thanks!

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux