Commit e5cd429e authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by David S. Miller
Browse files

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: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Tested-by: Simon Horman <horms@kernel.org> # build-tested
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c5b0c34f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -269,7 +269,7 @@ static int orion_mdio_probe(struct platform_device *pdev)
	struct orion_mdio_dev *dev;
	struct orion_mdio_dev *dev;
	int i, ret;
	int i, ret;


	type = (enum orion_mdio_bus_type)device_get_match_data(&pdev->dev);
	type = (uintptr_t)device_get_match_data(&pdev->dev);


	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	if (!r) {
	if (!r) {