net/xgene: fix Wvoid-pointer-to-enum-cast warning
PATCH 1/2 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]
--- drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/apm/xgene/xgene_enet_main.c +1 -1
@@ -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 {
Signature · 1 line
2.34.1
PATCH 2/2 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]
--- drivers/net/ethernet/marvell/mvmdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/mvmdio.c +1 -1
@@ -269,7 +269,7 @@ static int orion_mdio_probe(struct platform_device *pdev)struct orion_mdio_dev *dev;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 );if (!r) {
Signature · 1 line
2.34.1
Re: [PATCH net-next 2/2] net/marvell: fix Wvoid-pointer-to-enum-cast warning
Quoted 6 lines · Krzysztof Kozlowski
'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 <[email protected]>
Quoted 6 lines · Krzysztof Kozlowski
'
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 <[email protected]>
This series was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Quoted 8 lines · On Thu, 10 Aug 2023 12:39:22 +0200 you wrote:
'
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 <[email protected]>[...]
Here is the summary with links:
- [net-next,1/2] net/xgene: fix Wvoid-pointer-to-enum-cast warning
https://git.kernel.org/netdev/net-next/c/c5b0c34fae1e - [net-next,2/2] net/marvell: fix Wvoid-pointer-to-enum-cast warning https://git.kernel.org/netdev/net-next/c/e5cd429e7928
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html