]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
i2c: pxa: Fix Wvoid-pointer-to-enum-cast warning
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Wed, 26 Nov 2025 18:22:59 +0000 (19:22 +0100)
committerAndi Shyti <andi.shyti@kernel.org>
Tue, 16 Dec 2025 23:28:50 +0000 (00:28 +0100)
commit3ff79e76d31f32575fbd8a8ad6ce9108ca916d1a
treec4e967471b4ec88a4e4c4b48e1c81185f2d28330
parent60d7f6031b94b6dae9e7d95b49f5c7045f6c8edb
i2c: pxa: Fix Wvoid-pointer-to-enum-cast warning

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

  i2c-pxa.c:1269:15: error: cast to smaller integer type 'enum pxa_i2c_types' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

One of the discussions in 2023 on LKML suggested warning is not suitable
for kernel.  Nothing changed in this regard since that time, so assume
the warning will stay and we want to have warnings-free builds.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20251126182257.157439-5-krzysztof.kozlowski@oss.qualcomm.com
drivers/i2c/busses/i2c-pxa.c