Re: [PATCH] arm64/sysreg: Fix typo in Enum element regex

From: Catalin Marinas
Date: Fri Jun 10 2022 - 05:16:54 EST


On Thu, Jun 09, 2022 at 10:42:18PM +0200, Alejandro Tafalla wrote:
> In the awk script, there was a typo with the comparison operator when
> checking if the matched pattern is inside an Enum block.
> This prevented the generation of the whole sysreg-defs.h header.
>
> Fixes: 66847e0618d7 ("arm64: Add sysreg header generation scripting")
> Signed-off-by: Alejandro Tafalla <atafalla@xxxxxxxxx>
> ---
> arch/arm64/tools/gen-sysreg.awk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/tools/gen-sysreg.awk b/arch/arm64/tools/gen-sysreg.awk
> index 89bfb74e28de..5c55509eb43f 100755
> --- a/arch/arm64/tools/gen-sysreg.awk
> +++ b/arch/arm64/tools/gen-sysreg.awk
> @@ -253,7 +253,7 @@ END {
> next
> }
>
> -/0b[01]+/ && block = "Enum" {
> +/0b[01]+/ && block == "Enum" {

This makes sense but I'm surprised that we haven't noticed it until now
(maybe some awk versions treat it as a relational operator).

--
Catalin