Messages in this thread | | | Subject | Re: [PATCH] net: mdio: fix -Wvoid-pointer-to-enum-cast warning | From | patchwork-bot+netdevbpf@kernel ... | Date | Fri, 18 Aug 2023 03:10:22 +0000 |
| |
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>:
On Tue, 15 Aug 2023 20:35:59 +0000 you wrote: > When building with clang 18 I see the following warning: > | drivers/net/mdio/mdio-xgene.c:338:13: warning: cast to smaller integer > | type 'enum xgene_mdio_id' from 'const void *' [-Wvoid-pointer-to-enum-cast] > | 338 | mdio_id = (enum xgene_mdio_id)of_id->data; > > This is due to the fact that `of_id->data` is a void* while `enum > xgene_mdio_id` has the size of an int. This leads to truncation and > possible data loss. > > [...]
Here is the summary with links: - net: mdio: fix -Wvoid-pointer-to-enum-cast warning https://git.kernel.org/netdev/net-next/c/f3add6dec36d
You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
| |