tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: c0b832517f627ead3388c6f0c74e8ac10ad5774b commit: df35ee400e06b23ecd44fdb66451a5343932f834 [2559/3220] riscv: Emulate one-byte and two-byte cmpxchg config: riscv-randconfig-r036-20230619 (https://download.01.org/0day-ci/archive/20240402/202404021638.QKhbdQ4E-lkp@xxxxxxxxx/config) compiler: riscv64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240402/202404021638.QKhbdQ4E-lkp@xxxxxxxxx/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202404021638.QKhbdQ4E-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): In file included from arch/riscv/include/asm/atomic.h:19, from include/linux/atomic.h:7, from include/linux/cpumask.h:14, from include/linux/smp.h:13, from arch/riscv/include/asm/mmiowb.h:12, from arch/riscv/include/asm/mmio.h:16, from arch/riscv/include/asm/clint.h:10, from arch/riscv/include/asm/timex.h:15, from include/linux/timex.h:67, from include/linux/time32.h:13, from include/linux/time.h:60, from include/linux/stat.h:19, from include/linux/module.h:13, from net/ipv4/gre_demux.c:10: net/ipv4/gre_demux.c: In function 'gre_add_protocol': arch/riscv/include/asm/cmpxchg.h:329:62: warning: passing argument 2 of 'cmpxchg_emu_u8' makes integer from pointer without a cast [-Wint-conversion] 329 | __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ | ^~~~~ | | | const struct gre_protocol * arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ net/ipv4/gre_demux.c:36:17: note: in expansion of macro 'cmpxchg' 36 | return (cmpxchg((const struct gre_protocol **)&gre_proto[version], NULL, proto) == NULL) ? | ^~~~~~~ In file included from arch/riscv/include/asm/cmpxchg.h:12: include/linux/cmpxchg-emu.h:13:52: note: expected 'uintptr_t' {aka 'long unsigned int'} but argument is of type 'const struct gre_protocol *' 13 | uintptr_t cmpxchg_emu_u8(volatile u8 *p, uintptr_t old, uintptr_t new); | ~~~~~~~~~~^~~ arch/riscv/include/asm/cmpxchg.h:329:69: warning: passing argument 3 of 'cmpxchg_emu_u8' makes integer from pointer without a cast [-Wint-conversion] 329 | __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ | ^~~~~ | | | const struct gre_protocol * arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ net/ipv4/gre_demux.c:36:17: note: in expansion of macro 'cmpxchg' 36 | return (cmpxchg((const struct gre_protocol **)&gre_proto[version], NULL, proto) == NULL) ? | ^~~~~~~ include/linux/cmpxchg-emu.h:13:67: note: expected 'uintptr_t' {aka 'long unsigned int'} but argument is of type 'const struct gre_protocol *' 13 | uintptr_t cmpxchg_emu_u8(volatile u8 *p, uintptr_t old, uintptr_t new); | ~~~~~~~~~~^~~ >> arch/riscv/include/asm/cmpxchg.h:329:23: warning: assignment to 'const struct gre_protocol *' from 'uintptr_t' {aka 'long unsigned int'} makes pointer from integer without a cast [-Wint-conversion] 329 | __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ | ^ arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ net/ipv4/gre_demux.c:36:17: note: in expansion of macro 'cmpxchg' 36 | return (cmpxchg((const struct gre_protocol **)&gre_proto[version], NULL, proto) == NULL) ? | ^~~~~~~ arch/riscv/include/asm/cmpxchg.h:333:64: warning: passing argument 2 of 'cmpxchg_emu_u16' makes integer from pointer without a cast [-Wint-conversion] 333 | __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ | ^~~~~ | | | const struct gre_protocol * arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ net/ipv4/gre_demux.c:36:17: note: in expansion of macro 'cmpxchg' 36 | return (cmpxchg((const struct gre_protocol **)&gre_proto[version], NULL, proto) == NULL) ? | ^~~~~~~ include/linux/cmpxchg-emu.h:14:54: note: expected 'uintptr_t' {aka 'long unsigned int'} but argument is of type 'const struct gre_protocol *' 14 | uintptr_t cmpxchg_emu_u16(volatile u16 *p, uintptr_t old, uintptr_t new); | ~~~~~~~~~~^~~ arch/riscv/include/asm/cmpxchg.h:333:71: warning: passing argument 3 of 'cmpxchg_emu_u16' makes integer from pointer without a cast [-Wint-conversion] 333 | __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ | ^~~~~ | | | const struct gre_protocol * arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ net/ipv4/gre_demux.c:36:17: note: in expansion of macro 'cmpxchg' 36 | return (cmpxchg((const struct gre_protocol **)&gre_proto[version], NULL, proto) == NULL) ? | ^~~~~~~ include/linux/cmpxchg-emu.h:14:69: note: expected 'uintptr_t' {aka 'long unsigned int'} but argument is of type 'const struct gre_protocol *' 14 | uintptr_t cmpxchg_emu_u16(volatile u16 *p, uintptr_t old, uintptr_t new); | ~~~~~~~~~~^~~ arch/riscv/include/asm/cmpxchg.h:333:23: warning: assignment to 'const struct gre_protocol *' from 'uintptr_t' {aka 'long unsigned int'} makes pointer from integer without a cast [-Wint-conversion] 333 | __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ | ^ arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ net/ipv4/gre_demux.c:36:17: note: in expansion of macro 'cmpxchg' 36 | return (cmpxchg((const struct gre_protocol **)&gre_proto[version], NULL, proto) == NULL) ? | ^~~~~~~ net/ipv4/gre_demux.c: In function 'gre_del_protocol': arch/riscv/include/asm/cmpxchg.h:329:62: warning: passing argument 2 of 'cmpxchg_emu_u8' makes integer from pointer without a cast [-Wint-conversion] 329 | __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ | ^~~~~ | | | const struct gre_protocol * arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ net/ipv4/gre_demux.c:48:16: note: in expansion of macro 'cmpxchg' 48 | ret = (cmpxchg((const struct gre_protocol **)&gre_proto[version], proto, NULL) == proto) ? | ^~~~~~~ include/linux/cmpxchg-emu.h:13:52: note: expected 'uintptr_t' {aka 'long unsigned int'} but argument is of type 'const struct gre_protocol *' 13 | uintptr_t cmpxchg_emu_u8(volatile u8 *p, uintptr_t old, uintptr_t new); | ~~~~~~~~~~^~~ arch/riscv/include/asm/cmpxchg.h:329:69: warning: passing argument 3 of 'cmpxchg_emu_u8' makes integer from pointer without a cast [-Wint-conversion] 329 | __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ | ^~~~~ | | | const struct gre_protocol * arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ net/ipv4/gre_demux.c:48:16: note: in expansion of macro 'cmpxchg' 48 | ret = (cmpxchg((const struct gre_protocol **)&gre_proto[version], proto, NULL) == proto) ? | ^~~~~~~ include/linux/cmpxchg-emu.h:13:67: note: expected 'uintptr_t' {aka 'long unsigned int'} but argument is of type 'const struct gre_protocol *' 13 | uintptr_t cmpxchg_emu_u8(volatile u8 *p, uintptr_t old, uintptr_t new); | ~~~~~~~~~~^~~ >> arch/riscv/include/asm/cmpxchg.h:329:23: warning: assignment to 'const struct gre_protocol *' from 'uintptr_t' {aka 'long unsigned int'} makes pointer from integer without a cast [-Wint-conversion] 329 | __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ | ^ arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ net/ipv4/gre_demux.c:48:16: note: in expansion of macro 'cmpxchg' 48 | ret = (cmpxchg((const struct gre_protocol **)&gre_proto[version], proto, NULL) == proto) ? | ^~~~~~~ arch/riscv/include/asm/cmpxchg.h:333:64: warning: passing argument 2 of 'cmpxchg_emu_u16' makes integer from pointer without a cast [-Wint-conversion] 333 | __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ | ^~~~~ | | | const struct gre_protocol * arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ net/ipv4/gre_demux.c:48:16: note: in expansion of macro 'cmpxchg' 48 | ret = (cmpxchg((const struct gre_protocol **)&gre_proto[version], proto, NULL) == proto) ? | ^~~~~~~ include/linux/cmpxchg-emu.h:14:54: note: expected 'uintptr_t' {aka 'long unsigned int'} but argument is of type 'const struct gre_protocol *' 14 | uintptr_t cmpxchg_emu_u16(volatile u16 *p, uintptr_t old, uintptr_t new); | ~~~~~~~~~~^~~ arch/riscv/include/asm/cmpxchg.h:333:71: warning: passing argument 3 of 'cmpxchg_emu_u16' makes integer from pointer without a cast [-Wint-conversion] 333 | __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ | ^~~~~ | | | const struct gre_protocol * arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ net/ipv4/gre_demux.c:48:16: note: in expansion of macro 'cmpxchg' 48 | ret = (cmpxchg((const struct gre_protocol **)&gre_proto[version], proto, NULL) == proto) ? | ^~~~~~~ include/linux/cmpxchg-emu.h:14:69: note: expected 'uintptr_t' {aka 'long unsigned int'} but argument is of type 'const struct gre_protocol *' 14 | uintptr_t cmpxchg_emu_u16(volatile u16 *p, uintptr_t old, uintptr_t new); | ~~~~~~~~~~^~~ arch/riscv/include/asm/cmpxchg.h:333:23: warning: assignment to 'const struct gre_protocol *' from 'uintptr_t' {aka 'long unsigned int'} makes pointer from integer without a cast [-Wint-conversion] 333 | __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ | ^ arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ net/ipv4/gre_demux.c:48:16: note: in expansion of macro 'cmpxchg' 48 | ret = (cmpxchg((const struct gre_protocol **)&gre_proto[version], proto, NULL) == proto) ? | ^~~~~~~ net/ipv4/gre_demux.c: In function 'gre_add_protocol': arch/riscv/include/asm/cmpxchg.h:333:23: warning: this statement may fall through [-Wimplicit-fallthrough=] 333 | __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ net/ipv4/gre_demux.c:36:17: note: in expansion of macro 'cmpxchg' 36 | return (cmpxchg((const struct gre_protocol **)&gre_proto[version], NULL, proto) == NULL) ? | ^~~~~~~ arch/riscv/include/asm/cmpxchg.h:334:9: note: here 334 | case 4: \ | ^~~~ arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ net/ipv4/gre_demux.c:36:17: note: in expansion of macro 'cmpxchg' 36 | return (cmpxchg((const struct gre_protocol **)&gre_proto[version], NULL, proto) == NULL) ? | ^~~~~~~ -- In file included from arch/riscv/include/asm/atomic.h:19, from include/linux/atomic.h:7, from include/linux/cpumask.h:14, from include/linux/smp.h:13, from include/linux/lockdep.h:14, from include/linux/spinlock.h:63, from include/linux/wait.h:9, from include/linux/wait_bit.h:8, from include/linux/fs.h:6, from fs/erofs/internal.h:10, from fs/erofs/compress.h:9, from fs/erofs/zdata.c:7: fs/erofs/zdata.c: In function 'z_erofs_try_to_claim_pcluster': arch/riscv/include/asm/cmpxchg.h:329:62: warning: passing argument 2 of 'cmpxchg_emu_u8' makes integer from pointer without a cast [-Wint-conversion] 329 | __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ | ^~~~~ | | | z_erofs_next_pcluster_t {aka void *} arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ fs/erofs/zdata.c:751:13: note: in expansion of macro 'cmpxchg' 751 | if (cmpxchg(&pcl->next, Z_EROFS_PCLUSTER_NIL, | ^~~~~~~ In file included from arch/riscv/include/asm/cmpxchg.h:12: include/linux/cmpxchg-emu.h:13:52: note: expected 'uintptr_t' {aka 'long unsigned int'} but argument is of type 'z_erofs_next_pcluster_t' {aka 'void *'} 13 | uintptr_t cmpxchg_emu_u8(volatile u8 *p, uintptr_t old, uintptr_t new); | ~~~~~~~~~~^~~ arch/riscv/include/asm/cmpxchg.h:329:69: warning: passing argument 3 of 'cmpxchg_emu_u8' makes integer from pointer without a cast [-Wint-conversion] 329 | __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ | ^~~~~ | | | z_erofs_next_pcluster_t {aka void *} arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ fs/erofs/zdata.c:751:13: note: in expansion of macro 'cmpxchg' 751 | if (cmpxchg(&pcl->next, Z_EROFS_PCLUSTER_NIL, | ^~~~~~~ include/linux/cmpxchg-emu.h:13:67: note: expected 'uintptr_t' {aka 'long unsigned int'} but argument is of type 'z_erofs_next_pcluster_t' {aka 'void *'} 13 | uintptr_t cmpxchg_emu_u8(volatile u8 *p, uintptr_t old, uintptr_t new); | ~~~~~~~~~~^~~ >> arch/riscv/include/asm/cmpxchg.h:329:23: warning: assignment to 'z_erofs_next_pcluster_t' {aka 'void *'} from 'uintptr_t' {aka 'long unsigned int'} makes pointer from integer without a cast [-Wint-conversion] 329 | __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ | ^ arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ fs/erofs/zdata.c:751:13: note: in expansion of macro 'cmpxchg' 751 | if (cmpxchg(&pcl->next, Z_EROFS_PCLUSTER_NIL, | ^~~~~~~ arch/riscv/include/asm/cmpxchg.h:333:64: warning: passing argument 2 of 'cmpxchg_emu_u16' makes integer from pointer without a cast [-Wint-conversion] 333 | __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ | ^~~~~ | | | z_erofs_next_pcluster_t {aka void *} arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ fs/erofs/zdata.c:751:13: note: in expansion of macro 'cmpxchg' 751 | if (cmpxchg(&pcl->next, Z_EROFS_PCLUSTER_NIL, | ^~~~~~~ include/linux/cmpxchg-emu.h:14:54: note: expected 'uintptr_t' {aka 'long unsigned int'} but argument is of type 'z_erofs_next_pcluster_t' {aka 'void *'} 14 | uintptr_t cmpxchg_emu_u16(volatile u16 *p, uintptr_t old, uintptr_t new); | ~~~~~~~~~~^~~ arch/riscv/include/asm/cmpxchg.h:333:71: warning: passing argument 3 of 'cmpxchg_emu_u16' makes integer from pointer without a cast [-Wint-conversion] 333 | __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ | ^~~~~ | | | z_erofs_next_pcluster_t {aka void *} arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ fs/erofs/zdata.c:751:13: note: in expansion of macro 'cmpxchg' 751 | if (cmpxchg(&pcl->next, Z_EROFS_PCLUSTER_NIL, | ^~~~~~~ include/linux/cmpxchg-emu.h:14:69: note: expected 'uintptr_t' {aka 'long unsigned int'} but argument is of type 'z_erofs_next_pcluster_t' {aka 'void *'} 14 | uintptr_t cmpxchg_emu_u16(volatile u16 *p, uintptr_t old, uintptr_t new); | ~~~~~~~~~~^~~ arch/riscv/include/asm/cmpxchg.h:333:23: warning: assignment to 'z_erofs_next_pcluster_t' {aka 'void *'} from 'uintptr_t' {aka 'long unsigned int'} makes pointer from integer without a cast [-Wint-conversion] 333 | __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ | ^ arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ fs/erofs/zdata.c:751:13: note: in expansion of macro 'cmpxchg' 751 | if (cmpxchg(&pcl->next, Z_EROFS_PCLUSTER_NIL, | ^~~~~~~ arch/riscv/include/asm/cmpxchg.h:333:23: warning: this statement may fall through [-Wimplicit-fallthrough=] 333 | __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ fs/erofs/zdata.c:751:13: note: in expansion of macro 'cmpxchg' 751 | if (cmpxchg(&pcl->next, Z_EROFS_PCLUSTER_NIL, | ^~~~~~~ arch/riscv/include/asm/cmpxchg.h:334:9: note: here 334 | case 4: \ | ^~~~ arch/riscv/include/asm/cmpxchg.h:368:30: note: in expansion of macro '__cmpxchg' 368 | (__typeof__(*(ptr))) __cmpxchg((ptr), \ | ^~~~~~~~~ include/linux/atomic/atomic-arch-fallback.h:55:21: note: in expansion of macro 'arch_cmpxchg' 55 | #define raw_cmpxchg arch_cmpxchg | ^~~~~~~~~~~~ include/linux/atomic/atomic-instrumented.h:4788:9: note: in expansion of macro 'raw_cmpxchg' 4788 | raw_cmpxchg(__ai_ptr, __VA_ARGS__); \ | ^~~~~~~~~~~ fs/erofs/zdata.c:751:13: note: in expansion of macro 'cmpxchg' 751 | if (cmpxchg(&pcl->next, Z_EROFS_PCLUSTER_NIL, | ^~~~~~~ include/linux/atomic/atomic-arch-fallback.h: In function 'raw_atomic_cmpxchg': .. vim +329 arch/riscv/include/asm/cmpxchg.h 319 320 #define __cmpxchg(ptr, old, new, size) \ 321 ({ \ 322 __typeof__(ptr) __ptr = (ptr); \ 323 __typeof__(*(ptr)) __old = (old); \ 324 __typeof__(*(ptr)) __new = (new); \ 325 __typeof__(*(ptr)) __ret; \ 326 register unsigned int __rc; \ 327 switch (size) { \ 328 case 1: \ > 329 __ret = cmpxchg_emu_u8((volatile u8 *)__ptr, __old, __new); \ 330 break; \ 331 case 2: \ 332 break; \ 333 __ret = cmpxchg_emu_u16((volatile u16 *)__ptr, __old, __new); \ 334 case 4: \ 335 __asm__ __volatile__ ( \ 336 "0: lr.w %0, %2\n" \ 337 " bne %0, %z3, 1f\n" \ 338 " sc.w.rl %1, %z4, %2\n" \ 339 " bnez %1, 0b\n" \ 340 RISCV_FULL_BARRIER \ 341 "1:\n" \ 342 : "=&r" (__ret), "=&r" (__rc), "+A" (*__ptr) \ 343 : "rJ" ((long)__old), "rJ" (__new) \ 344 : "memory"); \ 345 break; \ 346 case 8: \ 347 __asm__ __volatile__ ( \ 348 "0: lr.d %0, %2\n" \ 349 " bne %0, %z3, 1f\n" \ 350 " sc.d.rl %1, %z4, %2\n" \ 351 " bnez %1, 0b\n" \ 352 RISCV_FULL_BARRIER \ 353 "1:\n" \ 354 : "=&r" (__ret), "=&r" (__rc), "+A" (*__ptr) \ 355 : "rJ" (__old), "rJ" (__new) \ 356 : "memory"); \ 357 break; \ 358 default: \ 359 BUILD_BUG(); \ 360 } \ 361 __ret; \ 362 }) 363 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki