diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2023-08-10 11:31:50 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2023-08-21 15:04:30 +0200 |
commit | 1ef2ebf2631221cf6ee975be81e95cb512f43346 (patch) | |
tree | b4bb190a08ed8732f816c842e18db9743c9b539d /drivers/hwmon | |
parent | hwmon: (lm85) fix Wvoid-pointer-to-enum-cast warning (diff) | |
download | linux-1ef2ebf2631221cf6ee975be81e95cb512f43346.tar.xz linux-1ef2ebf2631221cf6ee975be81e95cb512f43346.zip |
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>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/lm90.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index b25ae8b7ec90..e0d7454a301c 100644 --- a/drivers/hwmon/lm90.c +++ b/drivers/hwmon/lm90.c @@ -2765,7 +2765,7 @@ static int lm90_probe(struct i2c_client *client) /* Set the device type */ if (client->dev.of_node) - data->kind = (enum chips)of_device_get_match_data(&client->dev); + data->kind = (uintptr_t)of_device_get_match_data(&client->dev); else data->kind = i2c_match_id(lm90_id, client)->driver_data; |