Skip to content

Commit 35ba6bd

Browse files
committed
drm/bridge: ps8640: Fix size mismatch warning w/ len
After commit 26195af ("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 d03eba9 ("minmax: allow min()/max()/clamp() if the arguments have the same signedness."), but since commit 26195af ("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: 26195af ("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
1 parent aca58ea commit 35ba6bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/bridge/parade-ps8640.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux,
210210
struct ps8640 *ps_bridge = aux_to_ps8640(aux);
211211
struct regmap *map = ps_bridge->regmap[PAGE0_DP_CNTL];
212212
struct device *dev = &ps_bridge->page[PAGE0_DP_CNTL]->dev;
213-
unsigned int len = msg->size;
213+
size_t len = msg->size;
214214
unsigned int data;
215215
unsigned int base;
216216
int ret;

0 commit comments

Comments
 (0)