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

net/marvell: fix Wvoid-pointer-to-enum-cast warning

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

mvmdio.c:272:9: error: cast to smaller integer type 'enum orion_mdio_bus_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Simon Horman <horms@kernel.org> # build-tested
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Krzysztof Kozlowski and committed by
David S. Miller
e5cd429e c5b0c34f

+1 -1
+1 -1
drivers/net/ethernet/marvell/mvmdio.c
··· 269 269 struct orion_mdio_dev *dev; 270 270 int i, ret; 271 271 272 - type = (enum orion_mdio_bus_type)device_get_match_data(&pdev->dev); 272 + type = (uintptr_t)device_get_match_data(&pdev->dev); 273 273 274 274 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); 275 275 if (!r) {