Skip to content

Commit bb2efcd

Browse files
jones-drewpalmer-dabbelt
authored andcommitted
riscv: alternatives: Drop the underscores from the assembly macro names
The underscores aren't needed because there isn't anything already named without them and the _CFG extension. This is a bit of a cleanup by itself, but the real motivation is for a coming patch which would otherwise need to add two more underscores to these macro names, i.e. ____ALTERNATIVE_CFG, and that'd be gross. Signed-off-by: Andrew Jones <[email protected]> Tested-by: Lad Prabhakar <[email protected]> Acked-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 7d52eac commit bb2efcd

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

arch/riscv/include/asm/alternative-macros.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
.endif
3434
.endm
3535

36-
.macro __ALTERNATIVE_CFG old_c, new_c, vendor_id, errata_id, enable
36+
.macro ALTERNATIVE_CFG old_c, new_c, vendor_id, errata_id, enable
3737
886 :
3838
.option push
3939
.option norvc
@@ -45,21 +45,21 @@
4545
.endm
4646

4747
#define _ALTERNATIVE_CFG(old_c, new_c, vendor_id, errata_id, CONFIG_k) \
48-
__ALTERNATIVE_CFG old_c, new_c, vendor_id, errata_id, IS_ENABLED(CONFIG_k)
48+
ALTERNATIVE_CFG old_c, new_c, vendor_id, errata_id, IS_ENABLED(CONFIG_k)
4949

50-
.macro __ALTERNATIVE_CFG_2 old_c, new_c_1, vendor_id_1, errata_id_1, enable_1, \
51-
new_c_2, vendor_id_2, errata_id_2, enable_2
52-
__ALTERNATIVE_CFG \old_c, \new_c_1, \vendor_id_1, \errata_id_1, \enable_1
50+
.macro ALTERNATIVE_CFG_2 old_c, new_c_1, vendor_id_1, errata_id_1, enable_1, \
51+
new_c_2, vendor_id_2, errata_id_2, enable_2
52+
ALTERNATIVE_CFG \old_c, \new_c_1, \vendor_id_1, \errata_id_1, \enable_1
5353
ALT_NEW_CONTENT \vendor_id_2, \errata_id_2, \enable_2, \new_c_2
5454
.endm
5555

5656
#define _ALTERNATIVE_CFG_2(old_c, new_c_1, vendor_id_1, errata_id_1, \
5757
CONFIG_k_1, \
5858
new_c_2, vendor_id_2, errata_id_2, \
5959
CONFIG_k_2) \
60-
__ALTERNATIVE_CFG_2 old_c, new_c_1, vendor_id_1, errata_id_1, \
60+
ALTERNATIVE_CFG_2 old_c, new_c_1, vendor_id_1, errata_id_1, \
6161
IS_ENABLED(CONFIG_k_1), \
62-
new_c_2, vendor_id_2, errata_id_2, \
62+
new_c_2, vendor_id_2, errata_id_2, \
6363
IS_ENABLED(CONFIG_k_2)
6464

6565
#else /* !__ASSEMBLY__ */
@@ -126,15 +126,15 @@
126126
#else /* CONFIG_RISCV_ALTERNATIVE */
127127
#ifdef __ASSEMBLY__
128128

129-
.macro __ALTERNATIVE_CFG old_c
129+
.macro ALTERNATIVE_CFG old_c
130130
\old_c
131131
.endm
132132

133133
#define _ALTERNATIVE_CFG(old_c, ...) \
134-
__ALTERNATIVE_CFG old_c
134+
ALTERNATIVE_CFG old_c
135135

136136
#define _ALTERNATIVE_CFG_2(old_c, ...) \
137-
__ALTERNATIVE_CFG old_c
137+
ALTERNATIVE_CFG old_c
138138

139139
#else /* !__ASSEMBLY__ */
140140

0 commit comments

Comments
 (0)