Skip to content

Commit

Permalink
reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning
Browse files Browse the repository at this point in the history
[ Upstream commit b5ec294 ]

'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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
krzk authored and gregkh committed Jan 20, 2024
1 parent ad2347d commit 88c38fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/reset/hisilicon/hi6220_reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static int hi6220_reset_probe(struct platform_device *pdev)
if (!data)
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);
if (IS_ERR(regmap)) {
Expand Down

0 comments on commit 88c38fd

Please sign in to comment.