Skip to content

Commit 45f980c

Browse files
krzkgroeck
authored andcommitted
hwmon: (pmbus/ibm-cffps) fix Wvoid-pointer-to-enum-cast warning
'vs' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: ibm-cffps.c:492:8: error: cast to smaller integer type 'enum versions' 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-12-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent 58aec51 commit 45f980c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hwmon/pmbus/ibm-cffps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ static int ibm_cffps_probe(struct i2c_client *client)
489489
const struct i2c_device_id *id;
490490

491491
if (md) {
492-
vs = (enum versions)md;
492+
vs = (uintptr_t)md;
493493
} else {
494494
id = i2c_match_id(ibm_cffps_id, client);
495495
if (id)

0 commit comments

Comments
 (0)