Skip to content

Commit 5005d1d

Browse files
mrutland-armctmarinas
authored andcommitted
arm64/sysreg: fix odd line spacing
Between the header and the definitions, there's no line gap, and in a couple of places a double line gap for no semantic reason, which makes the output look a little odd. Fix this so blocks are consistently separated with a single line gap: * Add a newline after the "Generated file" comment line, so this is clearly split from whatever the first definition in the file is. * At the start of a SysregFields block there's no need for a newline as we haven't output any sysreg encoding details prior to this. * At the end of a Sysreg block there's no need for a newline if we have no RES0 or RES1 fields, as there will be a line gap after the previous element (e.g. a Fields line). There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland <[email protected]> Cc: Mark Brown <[email protected]> Cc: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 82bf590 commit 5005d1d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/arm64/tools/gen-sysreg.awk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ BEGIN {
7777
print "#define __ASM_SYSREG_DEFS_H"
7878
print ""
7979
print "/* Generated file - do not edit */"
80+
print ""
8081

8182
block = "None"
8283
}
@@ -98,8 +99,6 @@ END {
9899
res0 = "UL(0)"
99100
res1 = "UL(0)"
100101

101-
print ""
102-
103102
next_bit = 63
104103

105104
next
@@ -162,7 +161,8 @@ END {
162161
define(reg "_RES0", "(" res0 ")")
163162
if (res1 != null)
164163
define(reg "_RES1", "(" res1 ")")
165-
print ""
164+
if (res0 != null || res1 != null)
165+
print ""
166166

167167
reg = null
168168
op0 = null

0 commit comments

Comments
 (0)