arm64/sysreg: Fix typo in Enum element regex
PATCH 1/1 arm64/sysreg: Fix typo in Enum element regex
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.
--- arch/arm64/tools/gen-sysreg.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/tools/gen-sysreg.awk +1 -1
@@ -253,7 +253,7 @@ END { next } -/0b[01]+/ && block = "Enum" { +/0b[01]+/ && block == "Enum" { expect_fields(2) val = $1 name = $2
Signature · 1 line
2.36.1
Catalin Marinas
maintainerQuoted 15 lines · Alejandro Tafalla
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.hheader.Fixes 66847e0618d7 ("arm64: Add sysreg header generation scripting")Signed-off-by Alejandro Tafalla <[email protected]>--- arch/arm64/tools/gen-sysreg.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/tools/gen-sysreg.awk +0
-0
arch/arm64/tools/gen-sysreg.awk END { · line 256
Quoted 5 lines
arch/arm64/tools/gen-sysreg.awk +1
-1@@ -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).
Signature · 6 lines
Catalin _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Mark Brown
Reviewed-byQuoted 11 lines · Catalin Marinas
arch/arm64/tools/gen-sysreg.awk END { · line 256
Quoted 6 lines · Alejandro Tafalla
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.hheader.arch/arm64/tools/gen-sysreg.awk +1
-1-/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).
What Catlain said - if we weren't generating the full header contents I'd expect things to fail to build normally, but it's entirely possible this is just happening to work with some implementations and the patch is clearly correct.
Quoted 12 lines · On viernes, 10 de junio de 2022 13:19:50 (CEST) Mark Brown wrote:
Quoted 10 lines · Catalin Marinas
arch/arm64/tools/gen-sysreg.awk END { · line 256
Quoted 6 lines · Alejandro Tafalla
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.hheader.arch/arm64/tools/gen-sysreg.awk +1
-1-/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).
Quoted 6 lines
What Catlain said - if we weren't generating the full header contents I'd expect things to fail to build normally, but it's entirely possible this is just happening to work with some implementations and the patch is clearly correct.
Reviewed-by Mark Brown <[email protected]>
Hi Mark, thanks for your review.
Indeed, I'm building the kernel in Alpine, which uses Busybox instead of gawk.
Quoted 5 lines · Alejandro Tafalla
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.hheader.
Applied to arm64 (for-next/fixes), thanks!
[1/1] arm64/sysreg: Fix typo in Enum element regex
https://git.kernel.org/arm64/c/ce253b8573ce
Signature · 1 line
Catalin