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

reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning

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

hi6220_reset.c:166:9: error: cast to smaller integer type 'enum hi6220_reset_ctrl_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810091300.70197-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

authored by

Krzysztof Kozlowski and committed by
Philipp Zabel
b5ec2944 b85ea95d

+1 -1
+1 -1
drivers/reset/hisilicon/hi6220_reset.c
··· 163 163 if (!data) 164 164 return -ENOMEM; 165 165 166 - type = (enum hi6220_reset_ctrl_type)of_device_get_match_data(dev); 166 + type = (uintptr_t)of_device_get_match_data(dev); 167 167 168 168 regmap = syscon_node_to_regmap(np); 169 169 if (IS_ERR(regmap)) {