<asm/setjmp.h>: Don't use __noreturn without header
Subsystems (6)
cover <asm/setjmp.h>: Don't use __noreturn without header
__noreturn is defined in <linux/compiler.h>, which isn't included in every <asm/setjmp>, so arm32 that uses setjmp outside of bthreads fails to build. In order to keep changes to a minimum, just replace __noreturn with __attribute__((noreturn))
Tested on:
arm32, aarch64, mipsel, mips, riscv32, riscv64
Ahmad Fatoum (8):
fixup! ARM: asm: setjmp: implement coroutine dependency initjmp() fixup! kvx: Implement setjmp/longjmp/initjmp
fixup! mips: Implement setjmp/longjmp/initjmp for 32BIT fixup! openrisc: Implement setjmp/longjmp/initjmp fixup! powerpc: Implement initjmp/setjmp/longjmp fixup! riscv: Implement setjmp/longjmp/initjmp for RV32I fixup! sandbox: asm: implement setjmp/longjmp/initjmp fixup! x86: implement setjmp/longjmp/initjmp
arch/arm/include/asm/setjmp.h | 2 +- arch/kvx/include/asm/setjmp.h | 2 +- arch/mips/include/asm/setjmp.h | 2 +- arch/openrisc/include/asm/setjmp.h | 2 +- arch/powerpc/include/asm/setjmp.h | 2 +- arch/riscv/include/asm/setjmp.h | 2 +- arch/sandbox/include/asm/setjmp.h | 2 +- arch/x86/include/asm/setjmp.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-)
Signature · 7 lines
2.30.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/8 fixup! ARM: asm: setjmp: implement coroutine dependency initjmp()
--- arch/arm/include/asm/setjmp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/include/asm/setjmp.h +1 -1
@@ -26,6 +26,6 @@ typedef struct jmp_buf_data jmp_buf[1];int setjmp (jmp_buf jmp) __attribute__((returns_twice));void longjmp (jmp_buf jmp,int ret) __attribute__((noreturn)); -int initjmp (jmp_buf jmp,void __noreturn (*func)(void ),void *stack_top); +int initjmp (jmp_buf jmp,void __attribute__((noreturn)) (*func)(void ),void *stack_top);#endif /* _SETJMP_H_ */
Signature · 7 lines
2.30.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/8 fixup! kvx: Implement setjmp/longjmp/initjmp
In reply to Ahmad Fatoum--- arch/kvx/include/asm/setjmp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/kvx/include/asm/setjmp.h +1 -1
@@ -8,7 +8,7 @@typedef u64 jmp_buf [22 ]; -int initjmp (jmp_buf jmp,void __noreturn (*func)(void ),void *stack_top); +int initjmp (jmp_buf jmp,void __attribute__((noreturn)) (*func)(void ),void *stack_top);int setjmp (jmp_buf jmp) __attribute__((returns_twice));void longjmp (jmp_buf jmp,int ret) __attribute__((noreturn));
Signature · 7 lines
2.30.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 3/8 fixup! mips: Implement setjmp/longjmp/initjmp for 32BIT
In reply to Ahmad Fatoum--- arch/mips/include/asm/setjmp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/include/asm/setjmp.h +1 -1
@@ -27,6 +27,6 @@ typedef struct __jmp_buf_internal_tag {int setjmp (jmp_buf jmp) __attribute__((returns_twice));void longjmp (jmp_buf jmp,int ret) __attribute__((noreturn)); -int initjmp (jmp_buf jmp,void __noreturn (*func)(void ),void *stack_top); +int initjmp (jmp_buf jmp,void __attribute__((noreturn)) (*func)(void ),void *stack_top);#endif /* _MIPS_BITS_SETJMP_H */
Signature · 7 lines
2.30.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 4/8 fixup! openrisc: Implement setjmp/longjmp/initjmp
In reply to Ahmad Fatoum--- arch/openrisc/include/asm/setjmp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/openrisc/include/asm/setjmp.h +1 -1
@@ -12,6 +12,6 @@ typedef long int jmp_buf[13];int setjmp (jmp_buf jmp) __attribute__((returns_twice));void longjmp (jmp_buf jmp,int ret) __attribute__((noreturn)); -int initjmp (jmp_buf jmp,void __noreturn (*func)(void ),void *stack_top); +int initjmp (jmp_buf jmp,void __attribute__((noreturn)) (*func)(void ),void *stack_top);#endif /* _OR1K_BITS_SETJMP_H */
Signature · 7 lines
2.30.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 5/8 fixup! powerpc: Implement initjmp/setjmp/longjmp
In reply to Ahmad Fatoum--- arch/powerpc/include/asm/setjmp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/include/asm/setjmp.h +1 -1
@@ -16,6 +16,6 @@ typedef struct __jmp_buf_internal_tag {int setjmp (jmp_buf jmp) __attribute__((returns_twice));void longjmp (jmp_buf jmp,int ret) __attribute__((noreturn)); -int initjmp (jmp_buf jmp,void __noreturn (*func)(void ),void *stack_top); +int initjmp (jmp_buf jmp,void __attribute__((noreturn)) (*func)(void ),void *stack_top);#endif /* _SETJMP_H_ */
Signature · 7 lines
2.30.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 6/8 fixup! riscv: Implement setjmp/longjmp/initjmp for RV32I
In reply to Ahmad Fatoum--- arch/riscv/include/asm/setjmp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/include/asm/setjmp.h +1 -1
@@ -22,6 +22,6 @@ typedef struct __jmp_buf_internal_tagint setjmp (jmp_buf jmp) __attribute__((returns_twice));void longjmp (jmp_buf jmp,int ret) __attribute__((noreturn)); -int initjmp (jmp_buf jmp,void __noreturn (*func)(void ),void *stack_top); +int initjmp (jmp_buf jmp,void __attribute__((noreturn)) (*func)(void ),void *stack_top);#endif /* _SETJMP_H_ */
Signature · 7 lines
2.30.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 7/8 fixup! sandbox: asm: implement setjmp/longjmp/initjmp
In reply to Ahmad Fatoum--- arch/sandbox/include/asm/setjmp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sandbox/include/asm/setjmp.h +1 -1
@@ -12,6 +12,6 @@ typedef struct jmp_buf_data jmp_buf[1];int setjmp (jmp_buf jmp) __attribute__((returns_twice));void longjmp (jmp_buf jmp,int ret) __attribute__((noreturn)); -int initjmp (jmp_buf jmp,void __noreturn (*func)(void ),void *stack_top); +int initjmp (jmp_buf jmp,void __attribute__((noreturn)) (*func)(void ),void *stack_top);#endif
Signature · 7 lines
2.30.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 8/8 fixup! x86: implement setjmp/longjmp/initjmp
In reply to Ahmad Fatoum--- arch/x86/include/asm/setjmp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/setjmp.h +1 -1
@@ -39,6 +39,6 @@ typedef struct jmp_buf_data jmp_buf[1]; int setjmp(jmp_buf jmp) __attribute__((returns_twice)) __sjlj_attr; void longjmp(jmp_buf jmp, int ret) __attribute__((noreturn)) __sjlj_attr; -int initjmp(jmp_buf jmp, void __noreturn (*func)(void), void *stack_top) __sjlj_attr; +int initjmp(jmp_buf jmp, void __attribute__((noreturn)) (*func)(void), void *stack_top) __sjlj_attr;#endif
Signature · 7 lines
2.30.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
AppliedQuoted 8 lines · Ahmad Fatoum
__noreturnis defined in <linux/compiler.h>, which isn't included in every <asm/setjmp>, so arm32 that uses setjmp outside of bthreads fails to build. In order to keep changes to a minimum, just replace__noreturnwith __attribute__((noreturn))Tested on:
arm32, aarch64, mipsel, mips, riscv32, riscv64
Quoted 9 lines
Ahmad Fatoum (8):
fixup! ARM: asm: setjmp: implement coroutine dependencyinitjmp()fixup! kvx: Implement setjmp/longjmp/initjmp
fixup! mips: Implement setjmp/longjmp/initjmp for 32BIT fixup! openrisc: Implement setjmp/longjmp/initjmp fixup! powerpc: Implement initjmp/setjmp/longjmp fixup! riscv: Implement setjmp/longjmp/initjmp for RV32I fixup! sandbox: asm: implement setjmp/longjmp/initjmp fixup! x86: implement setjmp/longjmp/initjmp
Applied, thanks
Sascha
Quoted 20 lines
arch/arm/include/asm/setjmp.h | 2 +- arch/kvx/include/asm/setjmp.h | 2 +- arch/mips/include/asm/setjmp.h | 2 +- arch/openrisc/include/asm/setjmp.h | 2 +- arch/powerpc/include/asm/setjmp.h | 2 +- arch/riscv/include/asm/setjmp.h | 2 +- arch/sandbox/include/asm/setjmp.h | 2 +- arch/x86/include/asm/setjmp.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-)Signature · 7 lines
2.30.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox