aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_out.c
diff options
context:
space:
mode:
authorJustin Stitt <[email protected]>2023-08-16 19:37:52 +0000
committerLee Jones <[email protected]>2023-11-01 11:28:24 +0000
commita09af0551f5cfa850ca4d39be4395bb3526c8bdf (patch)
treefecbac27db328b8521ab4a76a5acf5f7ef1d6f22 /net/lapb/lapb_out.c
parent0bb80ecc33a8fb5a682236443c1e740d5c917d1d (diff)
leds: pca955x: Fix -Wvoid-pointer-to-enum-cast warning
When building with clang 18 I see the following warning: | drivers/leds/leds-pca955x.c:487:15: warning: cast to smaller integer | type 'enum pca955x_type' from 'const void *' [-Wvoid-pointer-to-enum-cast] | 487 | chip_type = (enum pca955x_type)md; This is due to the fact that `md` is a void* while `enum pca995x_type` has the size of an int. Add uintptr_t cast to silence clang warning while also keeping enum cast for readability and consistency with other `chip_type` assignment just a few lines below: | chip_type = (enum pca955x_type)id->driver_data; Reported-by: Nathan Chancellor <[email protected]> Closes: https://github.com/ClangBuiltLinux/linux/issues/1910 Signed-off-by: Justin Stitt <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Link: https://lore.kernel.org/r/20230816-void-drivers-leds-leds-pca955x-v1-1-2967e4c1bdcc@google.com Signed-off-by: Lee Jones <[email protected]>
Diffstat (limited to 'net/lapb/lapb_out.c')
0 files changed, 0 insertions, 0 deletions