]> www.infradead.org Git - linux.git/commit
mfd: mxs-lradc: Fix Wvoid-pointer-to-enum-cast warning (again)
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thu, 6 Jun 2024 14:36:47 +0000 (16:36 +0200)
committerLee Jones <lee@kernel.org>
Thu, 4 Jul 2024 16:38:40 +0000 (17:38 +0100)
commit105d4b4a36d8d5872da77d8c3e0855b86fcc6c8c
treee50126b7f6e3dcc91b5b9f92ee99ec1e02a9e4d1
parent81c8920d46d449bec93c20b5083365a7cf2561aa
mfd: mxs-lradc: Fix Wvoid-pointer-to-enum-cast warning (again)

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

  mxs-lradc.c:140:15: error: cast to smaller integer type 'enum mxs_lradc_id' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Year ago this was solved, although LKML discussion suggested warning is
not suitable for kernel.  Nothing changed in this regard for a year, so
assume the warning will stay and we want to have warnings-free builds.

Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/
Link: https://lore.kernel.org/all/20230810095849.123321-1-krzysztof.kozlowski@linaro.org/
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240606143648.152668-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/mxs-lradc.c