mirror of
https://github.com/torvalds/linux.git
synced 2024-12-03 17:41:22 +00:00
38c2efa260
When building with clang 18 I see the following warning: | drivers/soc/renesas/rmobile-sysc.c:193:22: warning: cast to smaller integer | type 'enum pd_types' from 'const void *' [-Wvoid-pointer-to-enum-cast] | 193 | add_special_pd(np, (enum pd_types)id->data); This is due to the fact that `id->data` is a void* and `enum pd_types` has the size of an integer. This cast from pointer-width to int-width causes truncation and possible data loss. Instead, cast to `uintptr_t` which has the same width as void*. Reported-by: Nathan Chancellor <nathan@kernel.org> Closes: https://github.com/ClangBuiltLinux/linux/issues/1910 Signed-off-by: Justin Stitt <justinstitt@google.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20230814-void-drivers-soc-renesas-rmobile-sysc-v1-1-6648dfd854de@google.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
r8a774a1-sysc.c | ||
r8a774b1-sysc.c | ||
r8a774c0-sysc.c | ||
r8a774e1-sysc.c | ||
r8a779a0-sysc.c | ||
r8a779f0-sysc.c | ||
r8a779g0-sysc.c | ||
r8a7742-sysc.c | ||
r8a7743-sysc.c | ||
r8a7745-sysc.c | ||
r8a7779-sysc.c | ||
r8a7790-sysc.c | ||
r8a7791-sysc.c | ||
r8a7792-sysc.c | ||
r8a7794-sysc.c | ||
r8a7795-sysc.c | ||
r8a7796-sysc.c | ||
r8a77470-sysc.c | ||
r8a77965-sysc.c | ||
r8a77970-sysc.c | ||
r8a77980-sysc.c | ||
r8a77990-sysc.c | ||
r8a77995-sysc.c | ||
rcar-gen4-sysc.c | ||
rcar-gen4-sysc.h | ||
rcar-sysc.c | ||
rcar-sysc.h | ||
rmobile-sysc.c |