linux-stable/drivers/mtd/maps
Justin Stitt a417ab334d mtd: maps: fix -Wvoid-pointer-to-enum-cast warning
When building with clang 18 I see the following warning:
|       drivers/mtd/maps/physmap-versatile.c:209:25: warning: cast to smaller
|               integer type 'enum versatile_flashprot' from 'const void *' [-Wvoid-pointer-to-enum-cast]
|         209 |                 versatile_flashprot = (enum versatile_flashprot)devid->data;

This is due to the fact that `devid->data` is a void* while `enum versatile_flashprot`
has the size of an int.

Cast `devid->data` to a uintptr_t to silence the above warning for clang
builds using W=1.

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: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230816-void-drivers-mtd-maps-physmap-versatile-v2-1-433a25272bfa@google.com
2023-08-18 16:38:54 +02:00
..
amd76xrom.c
cfi_flagadm.c
ck804xrom.c
dc21285.c
esb2rom.c
ichxrom.c
impa7.c
intel_vr_nor.c
Kconfig
l440gx.c
lantiq-flash.c
Makefile
map_funcs.c
netsc520.c
nettel.c
pci.c
pcmciamtd.c
physmap-bt1-rom.c
physmap-bt1-rom.h
physmap-core.c
physmap-gemini.c
physmap-gemini.h
physmap-ixp4xx.c
physmap-ixp4xx.h
physmap-versatile.c
physmap-versatile.h
pismo.c
plat-ram.c
pxa2xx-flash.c
sa1100-flash.c
sbc_gxx.c
sc520cdp.c
scb2_flash.c
scx200_docflash.c
solutionengine.c
sun_uflash.c
ts5500_flash.c
tsunami_flash.c
uclinux.c
vmu-flash.c