mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [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

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®