lkml.org 
[lkml]   [2023]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] arm64: sysreg: Generate C compiler warnings on {read,write}_sysreg_s arguments
Date
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

\
 
 \ /
  Last update: 2023-08-16 20:27    [W:0.025 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site