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: <87pm1lsglp.fsf@minerva.mail-host-address-is-not-set>
Date:   Wed, 11 Oct 2023 10:33:54 +0200
From:   Javier Martinez Canillas <javierm@...hat.com>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     linux-kernel@...r.kernel.org, Maxime Ripard <mripard@...nel.org>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Daniel Vetter <daniel@...ll.ch>,
        David Airlie <airlied@...il.com>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH 3/8] drm/ssd13xx: Replace .page_height field in device
 info with a constant

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

Hello Geert,

Thanks a lot for your feedback.

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

Thanks!

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ