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

Configure Feed

Select the types of activity you want to include in your feed.

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

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

xgene_enet_main.c:2044:20: error: cast to smaller integer type 'enum xgene_enet_id' 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
c5b0c34f ac3899c6

+1 -1
+1 -1
drivers/net/ethernet/apm/xgene/xgene_enet_main.c
··· 2041 2041 2042 2042 of_id = of_match_device(xgene_enet_of_match, &pdev->dev); 2043 2043 if (of_id) { 2044 - pdata->enet_id = (enum xgene_enet_id)of_id->data; 2044 + pdata->enet_id = (uintptr_t)of_id->data; 2045 2045 } 2046 2046 #ifdef CONFIG_ACPI 2047 2047 else {