Re: [PATCH] net: mdio: fix -Wvoid-pointer-to-enum-cast warning

From: patchwork-bot+netdevbpf
Date: Thu Aug 17 2023 - 23:11:01 EST


Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

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