public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.19 1/7] reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning
@ 2023-12-26  0:26 Sasha Levin
  2023-12-26  0:26 ` [PATCH AUTOSEL 4.19 2/7] Input: atkbd - skip ATKBD_CMD_GETID in translated mode Sasha Levin
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Sasha Levin @ 2023-12-26  0:26 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Krzysztof Kozlowski, Philipp Zabel, Sasha Levin, robh, dlemoal,
	Steen.Hegelund

From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

[ Upstream commit b5ec294472794ed9ecba0cb4b8208372842e7e0d ]

'type' is an enum, thus cast of pointer on 64-bit compile test with W=1
causes:

  hi6220_reset.c:166:9: error: cast to smaller integer type 'enum hi6220_reset_ctrl_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810091300.70197-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/reset/hisilicon/hi6220_reset.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/reset/hisilicon/hi6220_reset.c b/drivers/reset/hisilicon/hi6220_reset.c
index d5e5229308f22..d77a7ad7e57a7 100644
--- a/drivers/reset/hisilicon/hi6220_reset.c
+++ b/drivers/reset/hisilicon/hi6220_reset.c
@@ -107,7 +107,7 @@ static int hi6220_reset_probe(struct platform_device *pdev)
 	if (!data)
 		return -ENOMEM;
 
-	type = (enum hi6220_reset_ctrl_type)of_device_get_match_data(dev);
+	type = (uintptr_t)of_device_get_match_data(dev);
 
 	regmap = syscon_node_to_regmap(np);
 	if (IS_ERR(regmap)) {
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-01-14 18:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-26  0:26 [PATCH AUTOSEL 4.19 1/7] reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning Sasha Levin
2023-12-26  0:26 ` [PATCH AUTOSEL 4.19 2/7] Input: atkbd - skip ATKBD_CMD_GETID in translated mode Sasha Levin
2023-12-26  0:26 ` [PATCH AUTOSEL 4.19 3/7] Input: i8042 - add nomux quirk for Acer P459-G2-M Sasha Levin
2023-12-26  0:26 ` [PATCH AUTOSEL 4.19 4/7] Input: amimouse - convert to platform remove callback returning void Sasha Levin
2024-01-09 11:44   ` Pavel Machek
2024-01-09 21:50     ` Uwe Kleine-König
2024-01-14 18:55       ` Sasha Levin
2023-12-26  0:26 ` [PATCH AUTOSEL 4.19 5/7] s390/scm: fix virtual vs physical address confusion Sasha Levin
2023-12-26  0:26 ` [PATCH AUTOSEL 4.19 6/7] ARC: fix spare error Sasha Levin
2023-12-26  0:26 ` [PATCH AUTOSEL 4.19 7/7] Input: xpad - add Razer Wolverine V2 support Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox