Skip to contentSkip to conversation

arm64/sysreg: Fix typo in Enum element regex

PATCH Applied Alejandro Tafalla 3 participants 5 messages Jun 9, 2022 – Jun 10, 2022 arm64

lore
Share & tools
lore
#0 lore raw

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.

Fixes 66847e0618d7 ("arm64: Add sysreg header generation scripting")
---
 arch/arm64/tools/gen-sysreg.awk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/tools/gen-sysreg.awk +1 -1
index 89bfb74e28de..5c55509eb43f 100755
@@ -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
maintainer
#1 lore raw
Quoted 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.h header.

Fixes 66847e0618d7 ("arm64: Add sysreg header generation scripting")
---
 arch/arm64/tools/gen-sysreg.awk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/tools/gen-sysreg.awk +0 -0
index 89bfb74e28de..5c55509eb43f 100755

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
Reviewed-by
#2 lore raw
Quoted 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.h header.

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.

#3 lore raw
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.h header.

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.

Hi Mark, thanks for your review.

Indeed, I'm building the kernel in Alpine, which uses Busybox instead of gawk.

maintainer Applied
#4 lore raw
In reply to Alejandro Tafalla
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.h header.

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