Skip to content

Commit b5ec294

Browse files
krzkpH5
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Philipp Zabel <[email protected]>
1 parent b85ea95 commit b5ec294

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/reset/hisilicon/hi6220_reset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static int hi6220_reset_probe(struct platform_device *pdev)
163163
if (!data)
164164
return -ENOMEM;
165165

166-
type = (enum hi6220_reset_ctrl_type)of_device_get_match_data(dev);
166+
type = (uintptr_t)of_device_get_match_data(dev);
167167

168168
regmap = syscon_node_to_regmap(np);
169169
if (IS_ERR(regmap)) {

0 commit comments

Comments
 (0)