diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2023-05-05 07:24:16 +0200 |
---|---|---|
committer | Christophe Leroy <christophe.leroy@csgroup.eu> | 2023-05-05 07:26:53 +0200 |
commit | 3febc89563f69494e69c04b30ffbed04fa3c2b82 (patch) | |
tree | 807d887510b3172619fd3b6a2c606f1be1300c54 | |
parent | bebb8dfabc3af9eeca4283000571a7400cb88c71 (diff) | |
download | u-boot-3febc89563f69494e69c04b30ffbed04fa3c2b82.zip u-boot-3febc89563f69494e69c04b30ffbed04fa3c2b82.tar.gz u-boot-3febc89563f69494e69c04b30ffbed04fa3c2b82.tar.bz2 |
powerpc: Force cast on memcpy_toio()
sparse reports the following warning:
CHECK arch/powerpc/cpu/mpc8xx/micropatch_usb_sof.c
arch/powerpc/cpu/mpc8xx/micropatch_usb_sof.c:29:9: warning: cast removes address space '<asn:2>' of expression
arch/powerpc/cpu/mpc8xx/micropatch_usb_sof.c:30:9: warning: cast removes address space '<asn:2>' of expression
This is because of (void *) casts for using memcpy() as a substitute.
Do like other architectures, __force the cast to silence the warning
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
-rw-r--r-- | arch/powerpc/include/asm/io.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h index 998a82a..f63cae0 100644 --- a/arch/powerpc/include/asm/io.h +++ b/arch/powerpc/include/asm/io.h @@ -95,9 +95,9 @@ extern void _outsl_ns(volatile u32 *port, const void *buf, int nl); #define IO_SPACE_LIMIT ~0 -#define memset_io(a,b,c) memset((void *)(a),(b),(c)) -#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) -#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) +#define memset_io(a,b,c) memset((void __force *)(a),(b),(c)) +#define memcpy_fromio(a,b,c) memcpy((a),(void __force *)(b),(c)) +#define memcpy_toio(a,b,c) memcpy((void __force *)(a),(b),(c)) /* * Enforce In-order Execution of I/O: |