2023-08-17 02:10:41

by Will Deacon

[permalink] [raw]
Subject: Re: [PATCH] arm64: sysreg: Generate C compiler warnings on {read,write}_sysreg_s arguments

On Tue, 15 Aug 2023 15:06:39 +0100, James Clark wrote:
> Evaluate the register before the asm section so that the C compiler
> generates warnings when there is an issue with the register argument.
>
> This will prevent possible future issues such as the one seen here [1]
> where a missing bracket caused the shift and addition operators to be
> evaluated in the wrong order, but no warning was emitted. The GNU
> assembler has no warning for when expressions evaluate differently to C
> due to different operator precedence, but the C compiler has some
> warnings that may suggest something is wrong. For example in this case
> the following warning would have been emitted:
>
> [...]

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64: sysreg: Generate C compiler warnings on {read,write}_sysreg_s arguments
https://git.kernel.org/arm64/c/18b8f57a7f51

Cheers,
--
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev