Skip to content

Commit

Permalink
phy: amlogic: meson-g12a-usb2: fix Wvoid-pointer-to-enum-cast warning
Browse files Browse the repository at this point in the history
'soc_id' is an enum, thus cast of pointer on 64-bit compile test with
W=1 causes:

  phy-meson-g12a-usb2.c:322:17: error: cast to smaller integer type 'enum meson_soc_id' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20230810091310.70231-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
Krzysztof Kozlowski authored and Vinod Koul committed Aug 22, 2023
1 parent 7451eec commit ffc1786
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/phy/amlogic/phy-meson-g12a-usb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ static int phy_meson_g12a_usb2_probe(struct platform_device *pdev)
if (IS_ERR(base))
return PTR_ERR(base);

priv->soc_id = (enum meson_soc_id)of_device_get_match_data(&pdev->dev);
priv->soc_id = (uintptr_t)of_device_get_match_data(&pdev->dev);

priv->regmap = devm_regmap_init_mmio(dev, base,
&phy_meson_g12a_usb2_regmap_conf);
Expand Down

0 comments on commit ffc1786

Please sign in to comment.