diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-11-19 19:13:53 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-11-19 19:13:53 +0100 |
commit | 26c9fdd6f3a4ab6c49500b6bb0fdd0a87c63932d (patch) | |
tree | f4f4347c6d8ba91a8d6789f23a155154ce66bf95 /tools/include | |
parent | Merge tag 'for-linus-6.13-rc1-tag' of git://git.kernel.org/pub/scm/linux/kern... (diff) | |
parent | selftests/nolibc: start qemu with 1 GiB of memory (diff) | |
download | linux-26c9fdd6f3a4ab6c49500b6bb0fdd0a87c63932d.tar.xz linux-26c9fdd6f3a4ab6c49500b6bb0fdd0a87c63932d.zip |
Merge tag 'nolibc.2024.11.01a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu
Pull nolibc updates from Paul McKenney:
- Fix potential error due to missing #include on s390
- Compatibility with -Wmissing-fallthrough
- Run qemu with more memory during tests
* tag 'nolibc.2024.11.01a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu:
selftests/nolibc: start qemu with 1 GiB of memory
tools/nolibc: compiler: add macro __nolibc_fallthrough
tools/nolibc: s390: include std.h
Diffstat (limited to 'tools/include')
-rw-r--r-- | tools/include/nolibc/arch-s390.h | 1 | ||||
-rw-r--r-- | tools/include/nolibc/compiler.h | 6 | ||||
-rw-r--r-- | tools/include/nolibc/stdio.h | 3 |
3 files changed, 9 insertions, 1 deletions
diff --git a/tools/include/nolibc/arch-s390.h b/tools/include/nolibc/arch-s390.h index 2ec13d8b9a2d..f9ab83a219b8 100644 --- a/tools/include/nolibc/arch-s390.h +++ b/tools/include/nolibc/arch-s390.h @@ -10,6 +10,7 @@ #include "compiler.h" #include "crt.h" +#include "std.h" /* Syscalls for s390: * - registers are 64-bit diff --git a/tools/include/nolibc/compiler.h b/tools/include/nolibc/compiler.h index 9bc6a706a332..fa1f547e7f13 100644 --- a/tools/include/nolibc/compiler.h +++ b/tools/include/nolibc/compiler.h @@ -32,4 +32,10 @@ # define __no_stack_protector __attribute__((__optimize__("-fno-stack-protector"))) #endif /* __nolibc_has_attribute(no_stack_protector) */ +#if __nolibc_has_attribute(fallthrough) +# define __nolibc_fallthrough do { } while (0); __attribute__((fallthrough)) +#else +# define __nolibc_fallthrough do { } while (0) +#endif /* __nolibc_has_attribute(fallthrough) */ + #endif /* _NOLIBC_COMPILER_H */ diff --git a/tools/include/nolibc/stdio.h b/tools/include/nolibc/stdio.h index c968dbbc4ef8..3892034198dd 100644 --- a/tools/include/nolibc/stdio.h +++ b/tools/include/nolibc/stdio.h @@ -15,6 +15,7 @@ #include "stdarg.h" #include "stdlib.h" #include "string.h" +#include "compiler.h" #ifndef EOF #define EOF (-1) @@ -264,7 +265,7 @@ int vfprintf(FILE *stream, const char *fmt, va_list args) case 'p': *(out++) = '0'; *(out++) = 'x'; - /* fall through */ + __nolibc_fallthrough; default: /* 'x' and 'p' above */ u64toh_r(v, out); break; |