public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/15] hwmon: (adt7475) fix Wvoid-pointer-to-enum-cast warning
@ 2023-08-10  9:31 Krzysztof Kozlowski
  2023-08-10  9:31 ` [PATCH 02/15] hwmon: (ad7418) " Krzysztof Kozlowski
                   ` (14 more replies)
  0 siblings, 15 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10  9:31 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck, Eric Tremblay, linux-hwmon,
	linux-kernel
  Cc: Andi Shyti, Krzysztof Kozlowski

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

  adt7475.c:1655:10: error: cast to smaller integer type 'enum chips' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

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

diff --git a/drivers/hwmon/adt7475.c b/drivers/hwmon/adt7475.c
index 5363254644da..03acadc3a6cb 100644
--- a/drivers/hwmon/adt7475.c
+++ b/drivers/hwmon/adt7475.c
@@ -1652,7 +1652,7 @@ static int adt7475_probe(struct i2c_client *client)
 	i2c_set_clientdata(client, data);
 
 	if (client->dev.of_node)
-		chip = (enum chips)of_device_get_match_data(&client->dev);
+		chip = (uintptr_t)of_device_get_match_data(&client->dev);
 	else
 		chip = id->driver_data;
 
-- 
2.34.1


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

end of thread, other threads:[~2023-08-14  9:55 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10  9:31 [PATCH 01/15] hwmon: (adt7475) fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
2023-08-10  9:31 ` [PATCH 02/15] hwmon: (ad7418) " Krzysztof Kozlowski
2023-08-10  9:31 ` [PATCH 03/15] hwmon: (ads7828) " Krzysztof Kozlowski
2023-08-10  9:31 ` [PATCH 04/15] hwmon: (ina2xx) " Krzysztof Kozlowski
2023-08-14  8:33   ` David Laight
2023-08-14  9:54     ` Krzysztof Kozlowski
2023-08-10  9:31 ` [PATCH 05/15] hwmon: (lm63) " Krzysztof Kozlowski
2023-08-10  9:31 ` [PATCH 06/15] hwmon: (lm75) " Krzysztof Kozlowski
2023-08-10  9:31 ` [PATCH 07/15] hwmon: (lm85) " Krzysztof Kozlowski
2023-08-10  9:31 ` [PATCH 08/15] hwmon: (lm90) " Krzysztof Kozlowski
2023-08-10  9:31 ` [PATCH 09/15] hwmon: (max20730) " Krzysztof Kozlowski
2023-08-10  9:31 ` [PATCH 10/15] hwmon: (max6697) " Krzysztof Kozlowski
2023-08-10  9:31 ` [PATCH 11/15] hwmon: (tmp513) " Krzysztof Kozlowski
2023-08-10  9:31 ` [PATCH 12/15] hwmon: (pmbus/ibm-cffps) " Krzysztof Kozlowski
2023-08-10  9:31 ` [PATCH 13/15] hwmon: (pmbus/tps53679) " Krzysztof Kozlowski
2023-08-10  9:31 ` [PATCH 14/15] hwmon: (pmbus/ucd9000) " Krzysztof Kozlowski
2023-08-10  9:31 ` [PATCH 15/15] hwmon: (pmbus/ucd9200) " Krzysztof Kozlowski
2023-08-10 16:17 ` [PATCH 01/15] hwmon: (adt7475) " Guenter Roeck

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