s390/preempt: Fix __preempt_count_add_return() build error
The __atomic_add_const() function returns void, not the old value,
causing a build error when trying to use its return value:
arch/s390/include/asm/preempt.h:109:38: error: void value not ignored as it ought to be
109 | return val + __atomic_add_const(val, &get_lowcore()->preempt_count);
Fix this by performing the atomic add and then reading the value
separately, similar to how other architectures handle this.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508101209.7X3CLRPq-lkp@intel.com/
Signed-off-by: Joel Fernandes <joel@joelfernandes.org>1 file changed