mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/9] mfd: stmpe: Fix Wvoid-pointer-to-enum-cast warning
@ 2023-08-10  9:58 Krzysztof Kozlowski
  2023-08-10  9:58 ` [PATCH 2/9] mfd: max14577: " Krzysztof Kozlowski
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10  9:58 UTC (permalink / raw)
  To: Lee Jones, Chanwoo Choi, Krzysztof Kozlowski, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Maxime Coquelin, Alexandre Torgue, linux-kernel,
	linux-arm-kernel, linux-stm32, patches
  Cc: Andi Shyti

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

stmpe-i2c.c:90:13: error: cast to smaller integer type 'enum stmpe_partnum' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/mfd/stmpe-i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/stmpe-i2c.c b/drivers/mfd/stmpe-i2c.c
index 1d7b401776d1..fe018bedab98 100644
--- a/drivers/mfd/stmpe-i2c.c
+++ b/drivers/mfd/stmpe-i2c.c
@@ -87,7 +87,7 @@ stmpe_i2c_probe(struct i2c_client *i2c)
 		dev_info(&i2c->dev, "matching on node name, compatible is preferred\n");
 		partnum = id->driver_data;
 	} else
-		partnum = (enum stmpe_partnum)of_id->data;
+		partnum = (uintptr_t)of_id->data;
 
 	return stmpe_probe(&i2c_ci, partnum);
 }
-- 
2.34.1


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

end of thread, other threads:[~2023-08-17 17:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-10  9:58 [PATCH 1/9] mfd: stmpe: Fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
2023-08-10  9:58 ` [PATCH 2/9] mfd: max14577: " Krzysztof Kozlowski
2023-08-10 13:47   ` Chanwoo Choi
2023-08-10  9:58 ` [PATCH 3/9] mfd: max77541: " Krzysztof Kozlowski
2023-08-10  9:58 ` [PATCH 4/9] mfd: hi6421-pmic: " Krzysztof Kozlowski
2023-08-10  9:58 ` [PATCH 5/9] mfd: lp87565: " Krzysztof Kozlowski
2023-08-10  9:58 ` [PATCH 6/9] mfd: tc3589: " Krzysztof Kozlowski
2023-08-10  9:58 ` [PATCH 7/9] mfd: wm8994: " Krzysztof Kozlowski
2023-08-10 10:12   ` Charles Keepax
2023-08-10  9:58 ` [PATCH 8/9] mfd: wm31x: " Krzysztof Kozlowski
2023-08-10  9:58 ` [PATCH 9/9] mfd: mxs-lradc: " Krzysztof Kozlowski
2023-08-17 17:19 ` [PATCH 1/9] mfd: stmpe: " Lee Jones

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®