drm/bridge: ps8640: Fix size mismatch warning w/ len
authorDouglas Anderson <dianders@chromium.org>
Mon, 18 Dec 2023 17:04:54 +0000 (09:04 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jan 2024 16:16:47 +0000 (17:16 +0100)
commit8b410abf172994205a0a4341a8cc0a1bc14c5a3d
treee70ff7fc765c13e86ef4e95af8572befa191e8f2
parent1688af7d86ed83d98854ac8f302326a7d1a806a9
drm/bridge: ps8640: Fix size mismatch warning w/ len

[ Upstream commit 35ba6bd582cf926a082296b7e9a876ec81136cb1 ]

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.

The above error only shows up on downstream kernels without commit
d03eba99f5bf ("minmax: allow min()/max()/clamp() if the arguments have
the same signedness."), but since commit 26195af57798 ("drm/bridge:
ps8640: Drop the ability of ps8640 to fetch the EDID") is a "Fix" that
will likely be backported it seems nice to make it easy. ...plus it's
more correct to declare `len` as size_t anyway.

Fixes: 26195af57798 ("drm/bridge: ps8640: Drop the ability of ps8640 to fetch the EDID")
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20231218090454.1.I5c6eb80b2f746439c4b58efab788e00701d08759@changeid
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/bridge/parade-ps8640.c