diff options
author | Justin Stitt <justinstitt@google.com> | 2023-08-16 22:55:29 +0300 |
---|---|---|
committer | Noralf Trønnes <noralf@tronnes.org> | 2023-08-25 14:13:20 +0300 |
commit | 24883eb269f087b5d1068833fced543e020296ca (patch) | |
tree | 7d9512705223fad9290d3aae57fce5ebcf949c37 /drivers/gpu/drm/tests | |
parent | 17c35883cf5351fd0667083e752a28222a4cec55 (diff) | |
download | linux-24883eb269f087b5d1068833fced543e020296ca.tar.xz |
drm/repaper: fix -Wvoid-pointer-to-enum-cast warning
When building with clang 18 I see the following warning:
| drivers/gpu/drm/tiny/repaper.c:952:11: warning: cast to smaller integer
| type 'enum repaper_model' from 'const void *' [-Wvoid-pointer-to-enum-cast]
| 952 | model = (enum repaper_model)match;
|
This is due to the fact that `match` is a void* while `enum repaper_model`
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 `model` assignment just a
few lines below:
| model = (enum repaper_model)spi_id->driver_data;
Link: https://github.com/ClangBuiltLinux/linux/issues/1910
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Justin Stitt <justinstitt@google.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230816-void-drivers-gpu-drm-tiny-repaper-v1-1-9d8d10f0d52f@google.com
Diffstat (limited to 'drivers/gpu/drm/tests')
0 files changed, 0 insertions, 0 deletions