[PATCH v2] powerpc: Make setjmp/longjmp signature standard

Nathan Chancellor natechancellor at gmail.com
Mon Mar 30 18:57:47 AEDT 2020


On Mon, Mar 30, 2020 at 08:43:19AM +0200, Clement Courbet wrote:
> Declaring setjmp()/longjmp() as taking longs makes the signature
> non-standard, and makes clang complain. In the past, this has been
> worked around by adding -ffreestanding to the compile flags.
> 
> The implementation looks like it only ever propagates the value
> (in longjmp) or sets it to 1 (in setjmp), and we only call longjmp
> with integer parameters.
> 
> This allows removing -ffreestanding from the compilation flags.
> 
> Context:
> https://lore.kernel.org/patchwork/patch/1214060
> https://lore.kernel.org/patchwork/patch/1216174
> 
> Signed-off-by: Clement Courbet <courbet at google.com>
> Reviewed-by: Nathan Chancellor <natechancellor at gmail.com>
> Tested-by: Nathan Chancellor <natechancellor at gmail.com>
> 
> ---
> 
> v2:
> Use and array type as suggested by Segher Boessenkool
> Cc: stable at vger.kernel.org # v4.14+
> Fixes: c9029ef9c957 ("powerpc: Avoid clang warnings around setjmp and longjmp")

Actual diff itself looks good but these two tags need to be above your
signoff to be included in the final changelog. Not sure if Michael will
want a v3 with that or if it can manually be done when applying.

Cheers,
Nathan


More information about the Linuxppc-dev mailing list