Skip to content

Commit 1ef2ebf

Browse files
krzkgroeck
authored andcommitted
hwmon: (lm90) fix Wvoid-pointer-to-enum-cast warning
'kind' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: lm90.c:2768:16: 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> Link: https://lore.kernel.org/r/20230810093157.94244-8-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent 8d84910 commit 1ef2ebf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hwmon/lm90.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2765,7 +2765,7 @@ static int lm90_probe(struct i2c_client *client)
27652765

27662766
/* Set the device type */
27672767
if (client->dev.of_node)
2768-
data->kind = (enum chips)of_device_get_match_data(&client->dev);
2768+
data->kind = (uintptr_t)of_device_get_match_data(&client->dev);
27692769
else
27702770
data->kind = i2c_match_id(lm90_id, client)->driver_data;
27712771

0 commit comments

Comments
 (0)