* [PATCH] drm/bridge: ps8640: Fix size mismatch warning w/ len
@ 2023-12-18 17:04 ` Douglas Anderson
0 siblings, 0 replies; 8+ messages in thread
From: Douglas Anderson @ 2023-12-18 17:04 UTC (permalink / raw)
To: dri-devel
Cc: Guenter Roeck, Douglas Anderson, Andrzej Hajda, Daniel Vetter,
David Airlie, Jernej Skrabec, Jonas Karlman, Laurent Pinchart,
Maarten Lankhorst, Maxime Ripard, Neil Armstrong, Robert Foss,
Sam Ravnborg, Thomas Zimmermann, linux-kernel
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@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.
drivers/gpu/drm/bridge/parade-ps8640.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c
index d264b80d909d..541e4f5afc4c 100644
--- a/drivers/gpu/drm/bridge/parade-ps8640.c
+++ b/drivers/gpu/drm/bridge/parade-ps8640.c
@@ -210,7 +210,7 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux,
struct ps8640 *ps_bridge = aux_to_ps8640(aux);
struct regmap *map = ps_bridge->regmap[PAGE0_DP_CNTL];
struct device *dev = &ps_bridge->page[PAGE0_DP_CNTL]->dev;
- unsigned int len = msg->size;
+ size_t len = msg->size;
unsigned int data;
unsigned int base;
int ret;
--
2.43.0.472.g3155946c3a-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] drm/bridge: ps8640: Fix size mismatch warning w/ len
@ 2023-12-18 17:04 ` Douglas Anderson
0 siblings, 0 replies; 8+ messages in thread
From: Douglas Anderson @ 2023-12-18 17:04 UTC (permalink / raw)
To: dri-devel
Cc: Maxime Ripard, Neil Armstrong, Robert Foss, Andrzej Hajda,
Thomas Zimmermann, Jonas Karlman, Sam Ravnborg, Douglas Anderson,
Jernej Skrabec, linux-kernel, Laurent Pinchart, Guenter Roeck
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@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.
drivers/gpu/drm/bridge/parade-ps8640.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c
index d264b80d909d..541e4f5afc4c 100644
--- a/drivers/gpu/drm/bridge/parade-ps8640.c
+++ b/drivers/gpu/drm/bridge/parade-ps8640.c
@@ -210,7 +210,7 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux,
struct ps8640 *ps_bridge = aux_to_ps8640(aux);
struct regmap *map = ps_bridge->regmap[PAGE0_DP_CNTL];
struct device *dev = &ps_bridge->page[PAGE0_DP_CNTL]->dev;
- unsigned int len = msg->size;
+ size_t len = msg->size;
unsigned int data;
unsigned int base;
int ret;
--
2.43.0.472.g3155946c3a-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/bridge: ps8640: Fix size mismatch warning w/ len
2023-12-18 17:04 ` Douglas Anderson
@ 2023-12-18 17:24 ` Doug Anderson
-1 siblings, 0 replies; 8+ messages in thread
From: Doug Anderson @ 2023-12-18 17:24 UTC (permalink / raw)
To: dri-devel
Cc: Guenter Roeck, Andrzej Hajda, Daniel Vetter, David Airlie,
Jernej Skrabec, Jonas Karlman, Laurent Pinchart,
Maarten Lankhorst, Maxime Ripard, Neil Armstrong, Robert Foss,
Sam Ravnborg, Thomas Zimmermann, linux-kernel
Hi,
On Mon, Dec 18, 2023 at 9:05 AM Douglas Anderson <dianders@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@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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/bridge: ps8640: Fix size mismatch warning w/ len
@ 2023-12-18 17:24 ` Doug Anderson
0 siblings, 0 replies; 8+ messages in thread
From: Doug Anderson @ 2023-12-18 17:24 UTC (permalink / raw)
To: dri-devel
Cc: Maxime Ripard, Neil Armstrong, Robert Foss, Andrzej Hajda,
Thomas Zimmermann, Jonas Karlman, Sam Ravnborg, linux-kernel,
Jernej Skrabec, Laurent Pinchart, Guenter Roeck
Hi,
On Mon, Dec 18, 2023 at 9:05 AM Douglas Anderson <dianders@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@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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/bridge: ps8640: Fix size mismatch warning w/ len
2023-12-18 17:04 ` Douglas Anderson
@ 2023-12-19 0:19 ` Stephen Boyd
-1 siblings, 0 replies; 8+ messages in thread
From: Stephen Boyd @ 2023-12-19 0:19 UTC (permalink / raw)
To: Douglas Anderson, dri-devel
Cc: Maxime Ripard, Neil Armstrong, Robert Foss, Andrzej Hajda,
Thomas Zimmermann, Jonas Karlman, Sam Ravnborg, linux-kernel,
Jernej Skrabec, Laurent Pinchart, Guenter Roeck
Quoting Douglas Anderson (2023-12-18 09:04:54)
> 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@chromium.org>
> ---
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/bridge: ps8640: Fix size mismatch warning w/ len
@ 2023-12-19 0:19 ` Stephen Boyd
0 siblings, 0 replies; 8+ messages in thread
From: Stephen Boyd @ 2023-12-19 0:19 UTC (permalink / raw)
To: Douglas Anderson, dri-devel
Cc: Guenter Roeck, Andrzej Hajda, Daniel Vetter, David Airlie,
Jernej Skrabec, Jonas Karlman, Laurent Pinchart,
Maarten Lankhorst, Maxime Ripard, Neil Armstrong, Robert Foss,
Sam Ravnborg, Thomas Zimmermann, linux-kernel
Quoting Douglas Anderson (2023-12-18 09:04:54)
> 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@chromium.org>
> ---
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/bridge: ps8640: Fix size mismatch warning w/ len
2023-12-18 17:04 ` Douglas Anderson
@ 2023-12-19 15:15 ` Doug Anderson
-1 siblings, 0 replies; 8+ messages in thread
From: Doug Anderson @ 2023-12-19 15:15 UTC (permalink / raw)
To: dri-devel
Cc: Guenter Roeck, Andrzej Hajda, Daniel Vetter, David Airlie,
Jernej Skrabec, Jonas Karlman, Laurent Pinchart,
Maarten Lankhorst, Maxime Ripard, Neil Armstrong, Robert Foss,
Sam Ravnborg, Thomas Zimmermann, linux-kernel
Hi,
On Mon, Dec 18, 2023 at 9:05 AM Douglas Anderson <dianders@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@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.
>
> drivers/gpu/drm/bridge/parade-ps8640.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
I've added a short explanation that the issue only shows up on
backports to kernels that don't have commit d03eba99f5bf ("minmax:
allow min()/max()/clamp() if the arguments have the same signedness.")
and landed this.
35ba6bd582cf drm/bridge: ps8640: Fix size mismatch warning w/ len
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/bridge: ps8640: Fix size mismatch warning w/ len
@ 2023-12-19 15:15 ` Doug Anderson
0 siblings, 0 replies; 8+ messages in thread
From: Doug Anderson @ 2023-12-19 15:15 UTC (permalink / raw)
To: dri-devel
Cc: Maxime Ripard, Neil Armstrong, Robert Foss, Andrzej Hajda,
Thomas Zimmermann, Jonas Karlman, Sam Ravnborg, linux-kernel,
Jernej Skrabec, Laurent Pinchart, Guenter Roeck, David Airlie
Hi,
On Mon, Dec 18, 2023 at 9:05 AM Douglas Anderson <dianders@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@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.
>
> drivers/gpu/drm/bridge/parade-ps8640.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
I've added a short explanation that the issue only shows up on
backports to kernels that don't have commit d03eba99f5bf ("minmax:
allow min()/max()/clamp() if the arguments have the same signedness.")
and landed this.
35ba6bd582cf drm/bridge: ps8640: Fix size mismatch warning w/ len
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-12-19 15:15 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-18 17:04 [PATCH] drm/bridge: ps8640: Fix size mismatch warning w/ len Douglas Anderson
2023-12-18 17:04 ` Douglas Anderson
2023-12-18 17:24 ` Doug Anderson
2023-12-18 17:24 ` Doug Anderson
2023-12-19 0:19 ` Stephen Boyd
2023-12-19 0:19 ` Stephen Boyd
2023-12-19 15:15 ` Doug Anderson
2023-12-19 15:15 ` Doug Anderson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.