Commit b5ec2944 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Philipp Zabel

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: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810091300.70197-1-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent b85ea95d
...@@ -163,7 +163,7 @@ static int hi6220_reset_probe(struct platform_device *pdev) ...@@ -163,7 +163,7 @@ static int hi6220_reset_probe(struct platform_device *pdev)
if (!data) if (!data)
return -ENOMEM; return -ENOMEM;
type = (enum hi6220_reset_ctrl_type)of_device_get_match_data(dev); type = (uintptr_t)of_device_get_match_data(dev);
regmap = syscon_node_to_regmap(np); regmap = syscon_node_to_regmap(np);
if (IS_ERR(regmap)) { if (IS_ERR(regmap)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment