* [jfern:rust-spinlock-irq 2/21] arch/s390/include/asm/preempt.h:109:15: error: invalid operands to binary expression ('int' and 'void')
@ 2025-08-18 0:02 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-08-18 0:02 UTC (permalink / raw)
To: Boqun Feng; +Cc: llvm, oe-kbuild-all, Joel Fernandes
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git rust-spinlock-irq
head: 5b23adbb23dac965774935c047cc510bfaaa91c5
commit: 0c303a0d1f2100cb288a6ec2bc374c899c9d0cbf [2/21] preempt: Introduce __preempt_count_{sub, add}_return()
config: s390-defconfig (https://download.01.org/0day-ci/archive/20250818/202508180731.63jpKYCj-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 93d24b6b7b148c47a2fa228a4ef31524fa1d9f3f)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250818/202508180731.63jpKYCj-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508180731.63jpKYCj-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from arch/s390/kernel/asm-offsets.c:9:
In file included from include/linux/sched.h:13:
In file included from arch/s390/include/asm/processor.h:33:
In file included from include/linux/irqflags.h:19:
In file included from arch/s390/include/asm/percpu.h:5:
In file included from include/linux/preempt.h:85:
>> arch/s390/include/asm/preempt.h:109:15: error: invalid operands to binary expression ('int' and 'void')
109 | return val + __atomic_add_const(val, &get_lowcore()->preempt_count);
| ~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/s390/kernel/asm-offsets.c:14:
In file included from arch/s390/include/asm/stacktrace.h:7:
In file included from include/linux/ptrace.h:7:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:98:11: warning: array index 3 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
98 | return (set->sig[3] | set->sig[2] |
| ^ ~
arch/s390/include/asm/signal.h:22:9: note: array 'sig' declared here
22 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/s390/kernel/asm-offsets.c:14:
In file included from arch/s390/include/asm/stacktrace.h:7:
In file included from include/linux/ptrace.h:7:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:98:25: warning: array index 2 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
98 | return (set->sig[3] | set->sig[2] |
| ^ ~
arch/s390/include/asm/signal.h:22:9: note: array 'sig' declared here
22 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/s390/kernel/asm-offsets.c:14:
In file included from arch/s390/include/asm/stacktrace.h:7:
In file included from include/linux/ptrace.h:7:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:99:4: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
99 | set->sig[1] | set->sig[0]) == 0;
| ^ ~
arch/s390/include/asm/signal.h:22:9: note: array 'sig' declared here
22 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/s390/kernel/asm-offsets.c:14:
In file included from arch/s390/include/asm/stacktrace.h:7:
In file included from include/linux/ptrace.h:7:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:101:11: warning: array index 1 is past the end of the array (that has type 'unsigned long[1]') [-Warray-bounds]
101 | return (set->sig[1] | set->sig[0]) == 0;
| ^ ~
arch/s390/include/asm/signal.h:22:9: note: array 'sig' declared here
22 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/s390/kernel/asm-offsets.c:14:
In file included from arch/s390/include/asm/stacktrace.h:7:
In file included from include/linux/ptrace.h:7:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:114:11: warning: array index 3 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
114 | return (set1->sig[3] == set2->sig[3]) &&
| ^ ~
arch/s390/include/asm/signal.h:22:9: note: array 'sig' declared here
22 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/s390/kernel/asm-offsets.c:14:
In file included from arch/s390/include/asm/stacktrace.h:7:
In file included from include/linux/ptrace.h:7:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:114:27: warning: array index 3 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
114 | return (set1->sig[3] == set2->sig[3]) &&
| ^ ~
arch/s390/include/asm/signal.h:22:9: note: array 'sig' declared here
22 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/s390/kernel/asm-offsets.c:14:
In file included from arch/s390/include/asm/stacktrace.h:7:
In file included from include/linux/ptrace.h:7:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:115:5: warning: array index 2 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
115 | (set1->sig[2] == set2->sig[2]) &&
| ^ ~
arch/s390/include/asm/signal.h:22:9: note: array 'sig' declared here
22 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/s390/kernel/asm-offsets.c:14:
In file included from arch/s390/include/asm/stacktrace.h:7:
In file included from include/linux/ptrace.h:7:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:115:21: warning: array index 2 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
115 | (set1->sig[2] == set2->sig[2]) &&
| ^ ~
arch/s390/include/asm/signal.h:22:9: note: array 'sig' declared here
22 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/s390/kernel/asm-offsets.c:14:
In file included from arch/s390/include/asm/stacktrace.h:7:
In file included from include/linux/ptrace.h:7:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:116:5: warning: array index 1 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
116 | (set1->sig[1] == set2->sig[1]) &&
| ^ ~
arch/s390/include/asm/signal.h:22:9: note: array 'sig' declared here
22 | unsigned long sig[_NSIG_WORDS];
| ^
In file included from arch/s390/kernel/asm-offsets.c:14:
In file included from arch/s390/include/asm/stacktrace.h:7:
In file included from include/linux/ptrace.h:7:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:116:21: warning: array index 1 is past the end of the array (that has type 'const unsigned long[1]') [-Warray-bounds]
116 | (set1->sig[1] == set2->sig[1]) &&
| ^ ~
arch/s390/include/asm/signal.h:22:9: note: array 'sig' declared here
vim +109 arch/s390/include/asm/preempt.h
100
101 static __always_inline int __preempt_count_add_return(int val)
102 {
103 /*
104 * With some obscure config options and CONFIG_PROFILE_ALL_BRANCHES
105 * enabled, gcc 12 fails to handle __builtin_constant_p().
106 */
107 if (!IS_ENABLED(CONFIG_PROFILE_ALL_BRANCHES)) {
108 if (__builtin_constant_p(val) && (val >= -128) && (val <= 127)) {
> 109 return val + __atomic_add_const(val, &get_lowcore()->preempt_count);
110 }
111 }
112 return val + __atomic_add(val, &get_lowcore()->preempt_count);
113 }
114
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-08-18 0:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-18 0:02 [jfern:rust-spinlock-irq 2/21] arch/s390/include/asm/preempt.h:109:15: error: invalid operands to binary expression ('int' and 'void') kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).