[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <169219366150.1947685.9640471201961433232.b4-ty@kernel.org>
Date: Wed, 16 Aug 2023 19:25:25 +0100
From: Will Deacon <will@...nel.org>
To: anshuman.khandual@....com, linux-arm-kernel@...ts.infradead.org,
mark.rutland@....com, James Clark <james.clark@....com>
Cc: catalin.marinas@....com, kernel-team@...roid.com,
Will Deacon <will@...nel.org>,
Jintack Lim <jintack.lim@...aro.org>,
Kristina Martsenko <kristina.martsenko@....com>,
James Morse <james.morse@....com>,
linux-kernel@...r.kernel.org, Mark Brown <broonie@...nel.org>,
Rob Herring <robh@...nel.org>
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
Powered by blists - more mailing lists