Unverified Commit 7d52eace authored by Andrew Jones's avatar Andrew Jones Committed by Palmer Dabbelt
Browse files

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: default avatarAndrew Jones <ajones@ventanamicro.com>
Tested-by: default avatarLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Acked-by: default avatarConor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20221129150053.50464-3-ajones@ventanamicro.com


Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 2ba8c7dc
Loading
Loading
Loading
Loading
+7 −13
Original line number Diff line number Diff line
@@ -130,13 +130,10 @@
	\old_c
.endm

#define _ALTERNATIVE_CFG(old_c, new_c, vendor_id, errata_id, CONFIG_k) \
#define _ALTERNATIVE_CFG(old_c, ...)	\
	__ALTERNATIVE_CFG old_c

#define _ALTERNATIVE_CFG_2(old_c, new_c_1, vendor_id_1, errata_id_1,	\
					CONFIG_k_1,			\
				  new_c_2, vendor_id_2, errata_id_2,	\
					CONFIG_k_2)			\
#define _ALTERNATIVE_CFG_2(old_c, ...)	\
	__ALTERNATIVE_CFG old_c

#else /* !__ASSEMBLY__ */
@@ -144,13 +141,10 @@
#define __ALTERNATIVE_CFG(old_c)	\
	old_c "\n"

#define _ALTERNATIVE_CFG(old_c, new_c, vendor_id, errata_id, CONFIG_k) \
#define _ALTERNATIVE_CFG(old_c, ...)	\
	__ALTERNATIVE_CFG(old_c)

#define _ALTERNATIVE_CFG_2(old_c, new_c_1, vendor_id_1, errata_id_1,	\
					CONFIG_k_1,			\
				  new_c_2, vendor_id_2, errata_id_2,	\
					CONFIG_k_2) \
#define _ALTERNATIVE_CFG_2(old_c, ...)	\
	__ALTERNATIVE_CFG(old_c)

#endif /* __ASSEMBLY__ */