Skip to content

Commit 7d52eac

Browse files
jones-drewpalmer-dabbelt
authored andcommitted
riscv: alternatives: Don't name unused macro parameters
Without CONFIG_RISCV_ALTERNATIVE only the first parameter of the ALTERNATIVE macros is needed. Use ... for the rest to cut down on clutter. While there, fix a couple space vs. tab issues. 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 2ba8c7d commit 7d52eac

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

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

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -130,28 +130,22 @@
130130
\old_c
131131
.endm
132132

133-
#define _ALTERNATIVE_CFG(old_c, new_c, vendor_id, errata_id, CONFIG_k) \
133+
#define _ALTERNATIVE_CFG(old_c, ...) \
134134
__ALTERNATIVE_CFG old_c
135135

136-
#define _ALTERNATIVE_CFG_2(old_c, new_c_1, vendor_id_1, errata_id_1, \
137-
CONFIG_k_1, \
138-
new_c_2, vendor_id_2, errata_id_2, \
139-
CONFIG_k_2) \
140-
__ALTERNATIVE_CFG old_c
136+
#define _ALTERNATIVE_CFG_2(old_c, ...) \
137+
__ALTERNATIVE_CFG old_c
141138

142139
#else /* !__ASSEMBLY__ */
143140

144-
#define __ALTERNATIVE_CFG(old_c) \
141+
#define __ALTERNATIVE_CFG(old_c) \
145142
old_c "\n"
146143

147-
#define _ALTERNATIVE_CFG(old_c, new_c, vendor_id, errata_id, CONFIG_k) \
144+
#define _ALTERNATIVE_CFG(old_c, ...) \
148145
__ALTERNATIVE_CFG(old_c)
149146

150-
#define _ALTERNATIVE_CFG_2(old_c, new_c_1, vendor_id_1, errata_id_1, \
151-
CONFIG_k_1, \
152-
new_c_2, vendor_id_2, errata_id_2, \
153-
CONFIG_k_2) \
154-
__ALTERNATIVE_CFG(old_c)
147+
#define _ALTERNATIVE_CFG_2(old_c, ...) \
148+
__ALTERNATIVE_CFG(old_c)
155149

156150
#endif /* __ASSEMBLY__ */
157151
#endif /* CONFIG_RISCV_ALTERNATIVE */

0 commit comments

Comments
 (0)