[PATCH v2] arm64/cpucaps: increase string width to properly format cpucaps.h

Prathu Baronia posted 1 patch 2 years, 6 months ago
arch/arm64/tools/gen-cpucaps.awk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH v2] arm64/cpucaps: increase string width to properly format cpucaps.h
Posted by Prathu Baronia 2 years, 6 months ago
The lengthiest capability is `WORKAROUND_TRBE_OVERWRITE_FILL_MODE` and
its length is 35 characters so increase the width of left justified
strings to 40 and adjust the tab space for `ARM64_NCAPS` accordingly.
Now the generated cpucaps.h is properly formatted.

Signed-off-by: Prathu Baronia <quic_pbaronia@quicinc.com>
---
V1 -> V2: increase the width from 35 to 40

 arch/arm64/tools/gen-cpucaps.awk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/tools/gen-cpucaps.awk b/arch/arm64/tools/gen-cpucaps.awk
index 00c9e72a200a..8525980379d7 100755
--- a/arch/arm64/tools/gen-cpucaps.awk
+++ b/arch/arm64/tools/gen-cpucaps.awk
@@ -24,12 +24,12 @@ BEGIN {
 }
 
 /^[vA-Z0-9_]+$/ {
-	printf("#define ARM64_%-30s\t%d\n", $0, cap_num++)
+	printf("#define ARM64_%-40s\t%d\n", $0, cap_num++)
 	next
 }
 
 END {
-	printf("#define ARM64_NCAPS\t\t\t\t%d\n", cap_num)
+	printf("#define ARM64_NCAPS\t\t\t\t\t%d\n", cap_num)
 	print ""
 	print "#endif /* __ASM_CPUCAPS_H */"
 }

base-commit: 9d646009f65d62d32815f376465a3b92d8d9b046
-- 
2.25.1
Re: [PATCH v2] arm64/cpucaps: increase string width to properly format cpucaps.h
Posted by Catalin Marinas 2 years, 6 months ago
On Sat, 27 May 2023 18:08:58 +0530, Prathu Baronia wrote:
> The lengthiest capability is `WORKAROUND_TRBE_OVERWRITE_FILL_MODE` and
> its length is 35 characters so increase the width of left justified
> strings to 40 and adjust the tab space for `ARM64_NCAPS` accordingly.
> Now the generated cpucaps.h is properly formatted.
> 
> 

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64/cpucaps: increase string width to properly format cpucaps.h
      https://git.kernel.org/arm64/c/56b77ba112d4

-- 
Catalin