* [PATCH 1/2] drm/bridge: adv7511: fix Wvoid-pointer-to-enum-cast warning
@ 2023-08-10 9:59 Krzysztof Kozlowski
2023-08-10 9:59 ` [PATCH 2/2] drm/lima: " Krzysztof Kozlowski
2023-08-10 10:12 ` [PATCH 1/2] drm/bridge: adv7511: " Laurent Pinchart
0 siblings, 2 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10 9:59 UTC (permalink / raw)
To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter,
Qiang Yu, dri-devel, linux-kernel, lima
Cc: Andi Shyti, Krzysztof Kozlowski
'type' is an enum, thus cast of pointer on 64-bit compile test with W=1
causes:
adv7511_drv.c:1214:19: error: cast to smaller integer type 'enum adv7511_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index 2611afd2c1c1..0e284f379602 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -1211,7 +1211,7 @@ static int adv7511_probe(struct i2c_client *i2c)
adv7511->status = connector_status_disconnected;
if (dev->of_node)
- adv7511->type = (enum adv7511_type)of_device_get_match_data(dev);
+ adv7511->type = (uintptr_t)of_device_get_match_data(dev);
else
adv7511->type = id->driver_data;
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] drm/lima: fix Wvoid-pointer-to-enum-cast warning
2023-08-10 9:59 [PATCH 1/2] drm/bridge: adv7511: fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
@ 2023-08-10 9:59 ` Krzysztof Kozlowski
2023-08-10 11:59 ` Qiang Yu
2023-08-10 10:12 ` [PATCH 1/2] drm/bridge: adv7511: " Laurent Pinchart
1 sibling, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10 9:59 UTC (permalink / raw)
To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter,
Qiang Yu, dri-devel, linux-kernel, lima
Cc: Andi Shyti, Krzysztof Kozlowski
'id' is an enum, thus cast of pointer on 64-bit compile test with W=1
causes:
lima_drv.c:387:13: error: cast to smaller integer type 'enum lima_gpu_id' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/gpu/drm/lima/lima_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/lima/lima_drv.c b/drivers/gpu/drm/lima/lima_drv.c
index 10fd9154cc46..884181708de8 100644
--- a/drivers/gpu/drm/lima/lima_drv.c
+++ b/drivers/gpu/drm/lima/lima_drv.c
@@ -384,7 +384,7 @@ static int lima_pdev_probe(struct platform_device *pdev)
}
ldev->dev = &pdev->dev;
- ldev->id = (enum lima_gpu_id)of_device_get_match_data(&pdev->dev);
+ ldev->id = (uintptr_t)of_device_get_match_data(&pdev->dev);
platform_set_drvdata(pdev, ldev);
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] drm/bridge: adv7511: fix Wvoid-pointer-to-enum-cast warning
2023-08-10 9:59 [PATCH 1/2] drm/bridge: adv7511: fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
2023-08-10 9:59 ` [PATCH 2/2] drm/lima: " Krzysztof Kozlowski
@ 2023-08-10 10:12 ` Laurent Pinchart
2023-08-11 13:15 ` Robert Foss
1 sibling, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2023-08-10 10:12 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Andrzej Hajda, Neil Armstrong, Robert Foss, Jonas Karlman,
Jernej Skrabec, David Airlie, Daniel Vetter, Qiang Yu, dri-devel,
linux-kernel, lima, Andi Shyti
Hi Krzysztof,
Thank you for the patch.
On Thu, Aug 10, 2023 at 11:59:22AM +0200, Krzysztof Kozlowski wrote:
> 'type' is an enum, thus cast of pointer on 64-bit compile test with W=1
> causes:
>
> adv7511_drv.c:1214:19: error: cast to smaller integer type 'enum adv7511_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> index 2611afd2c1c1..0e284f379602 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> @@ -1211,7 +1211,7 @@ static int adv7511_probe(struct i2c_client *i2c)
> adv7511->status = connector_status_disconnected;
>
> if (dev->of_node)
> - adv7511->type = (enum adv7511_type)of_device_get_match_data(dev);
> + adv7511->type = (uintptr_t)of_device_get_match_data(dev);
> else
> adv7511->type = id->driver_data;
>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] drm/lima: fix Wvoid-pointer-to-enum-cast warning
2023-08-10 9:59 ` [PATCH 2/2] drm/lima: " Krzysztof Kozlowski
@ 2023-08-10 11:59 ` Qiang Yu
0 siblings, 0 replies; 5+ messages in thread
From: Qiang Yu @ 2023-08-10 11:59 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
Jonas Karlman, Jernej Skrabec, David Airlie, Daniel Vetter,
dri-devel, linux-kernel, lima, Andi Shyti
Reviewed-by: Qiang Yu <yuq825@gmail.com>
On Thu, Aug 10, 2023 at 5:59 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> 'id' is an enum, thus cast of pointer on 64-bit compile test with W=1
> causes:
>
> lima_drv.c:387:13: error: cast to smaller integer type 'enum lima_gpu_id' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> drivers/gpu/drm/lima/lima_drv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/lima/lima_drv.c b/drivers/gpu/drm/lima/lima_drv.c
> index 10fd9154cc46..884181708de8 100644
> --- a/drivers/gpu/drm/lima/lima_drv.c
> +++ b/drivers/gpu/drm/lima/lima_drv.c
> @@ -384,7 +384,7 @@ static int lima_pdev_probe(struct platform_device *pdev)
> }
>
> ldev->dev = &pdev->dev;
> - ldev->id = (enum lima_gpu_id)of_device_get_match_data(&pdev->dev);
> + ldev->id = (uintptr_t)of_device_get_match_data(&pdev->dev);
>
> platform_set_drvdata(pdev, ldev);
>
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] drm/bridge: adv7511: fix Wvoid-pointer-to-enum-cast warning
2023-08-10 10:12 ` [PATCH 1/2] drm/bridge: adv7511: " Laurent Pinchart
@ 2023-08-11 13:15 ` Robert Foss
0 siblings, 0 replies; 5+ messages in thread
From: Robert Foss @ 2023-08-11 13:15 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Krzysztof Kozlowski, Neil Armstrong, lima, Jonas Karlman,
dri-devel, linux-kernel, Jernej Skrabec, Qiang Yu, Andrzej Hajda,
Andi Shyti
On Thu, Aug 10, 2023 at 12:12 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Krzysztof,
>
> Thank you for the patch.
>
> On Thu, Aug 10, 2023 at 11:59:22AM +0200, Krzysztof Kozlowski wrote:
> > 'type' is an enum, thus cast of pointer on 64-bit compile test with W=1
> > causes:
> >
> > adv7511_drv.c:1214:19: error: cast to smaller integer type 'enum adv7511_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
> >
> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
>
> > ---
> > drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> > index 2611afd2c1c1..0e284f379602 100644
> > --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> > +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
> > @@ -1211,7 +1211,7 @@ static int adv7511_probe(struct i2c_client *i2c)
> > adv7511->status = connector_status_disconnected;
> >
> > if (dev->of_node)
> > - adv7511->type = (enum adv7511_type)of_device_get_match_data(dev);
> > + adv7511->type = (uintptr_t)of_device_get_match_data(dev);
> > else
> > adv7511->type = id->driver_data;
> >
>
> --
> Regards,
>
> Laurent Pinchart
>
Ack for drm/bridge part.
Acked-by: Robert Foss <rfoss@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-08-11 13:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-10 9:59 [PATCH 1/2] drm/bridge: adv7511: fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
2023-08-10 9:59 ` [PATCH 2/2] drm/lima: " Krzysztof Kozlowski
2023-08-10 11:59 ` Qiang Yu
2023-08-10 10:12 ` [PATCH 1/2] drm/bridge: adv7511: " Laurent Pinchart
2023-08-11 13:15 ` Robert Foss
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®