diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2023-08-10 12:39:22 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-08-11 10:58:45 +0200 |
commit | c5b0c34fae1ef234982d55445b8aa482f0b05ba6 (patch) | |
tree | e637a10937c5ac108d12524aab043235c3c51d02 /drivers/net/ethernet/apm | |
parent | net: mana: Add gdma stats to ethtool output for mana (diff) | |
download | linux-c5b0c34fae1ef234982d55445b8aa482f0b05ba6.tar.xz linux-c5b0c34fae1ef234982d55445b8aa482f0b05ba6.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/apm')
-rw-r--r-- | drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c index 41d96f4b23d8..4d4140b7c450 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c @@ -2041,7 +2041,7 @@ static int xgene_enet_probe(struct platform_device *pdev) of_id = of_match_device(xgene_enet_of_match, &pdev->dev); if (of_id) { - pdata->enet_id = (enum xgene_enet_id)of_id->data; + pdata->enet_id = (uintptr_t)of_id->data; } #ifdef CONFIG_ACPI else { |