[PATCH] drm/bridge: ps8640: Fix size mismatch warning w/ len

Doug Anderson dianders at chromium.org
Mon Dec 18 17:24:46 UTC 2023


Hi,

On Mon, Dec 18, 2023 at 9:05 AM Douglas Anderson <dianders at chromium.org> wrote:
>
> After commit 26195af57798 ("drm/bridge: ps8640: Drop the ability of
> ps8640 to fetch the EDID"), I got an error compiling:
>
>   error: comparison of distinct pointer types
>   ('typeof (len) *' (aka 'unsigned int *') and
>    'typeof (msg->size) *' (aka 'unsigned long *'))
>   [-Werror,-Wcompare-distinct-pointer-types]
>
> Fix it by declaring the `len` as size_t.
>
> Fixes: 26195af57798 ("drm/bridge: ps8640: Drop the ability of ps8640 to fetch the EDID")
> Signed-off-by: Douglas Anderson <dianders at chromium.org>
> ---
> Sorry for sending this hot on the heels of the other patch, but for
> some reason that other patch compiled fine for me until I picked it
> back to my downstream tree. I'll see if I can track down why. In any
> case, as soon as I see a Reviewed-by tag I'll land this.

Ah, I found it! <Phew> this makes me less worried that I had some
failure in my testing. I believe that upstream things weren't a
problem because of commit d03eba99f5bf ("minmax: allow
min()/max()/clamp() if the arguments have the same signedness.").
...so at least what's landed isn't actually broken upstream, just
downstream. It still feels reasonable to change this to "size_t",
though.

-Doug


More information about the dri-devel mailing list