[PATCH 8/8] s390/set_memory: Add __must_check to set_memory() primitives

From: Heiko Carstens

Date: Wed Nov 18 2026 - 09:48:01 EST


All set_memory() callers in s390 architecture code check the returned
value. Add __must_check to all variants to make sure no new callers
which don't check the return value are added.

This is the s390 version of commit 2abbd6d5fbe0 ("powerpc: Add
__must_check to set_memory_...()")

Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
---
arch/s390/include/asm/set_memory.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/s390/include/asm/set_memory.h b/arch/s390/include/asm/set_memory.h
index e3562bf0c1aa..036295215a1a 100644
--- a/arch/s390/include/asm/set_memory.h
+++ b/arch/s390/include/asm/set_memory.h
@@ -39,12 +39,12 @@ int __set_memory(unsigned long addr, unsigned long numpages, unsigned long flags
* for areas larger than 8TB, which may happen at memory initialization.
*/
#define __SET_MEMORY_FUNC(fname, flags) \
-static inline int fname(unsigned long addr, int numpages) \
+static inline int __must_check fname(unsigned long addr, int numpages) \
{ \
return __set_memory(addr, numpages, (flags)); \
} \
\
-static inline int __##fname(void *start, void *end) \
+static inline int __must_check __##fname(void *start, void *end) \
{ \
unsigned long numpages; \
\
--
2.56.1