Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

regulator: ltc3589: Fix Wvoid-pointer-to-enum-cast warning

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

ltc3589.c:394:22: error: cast to smaller integer type 'enum ltc3589_variant' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810111914.204847-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
fddc9bb6 55975401

+1 -2
+1 -2
drivers/regulator/ltc3589.c
··· 391 391 392 392 i2c_set_clientdata(client, ltc3589); 393 393 if (client->dev.of_node) 394 - ltc3589->variant = (enum ltc3589_variant) 395 - of_device_get_match_data(&client->dev); 394 + ltc3589->variant = (uintptr_t)of_device_get_match_data(&client->dev); 396 395 else 397 396 ltc3589->variant = id->driver_data; 398 397 ltc3589->dev = dev;