[PATCH 2/4] arm: socfpga: iossm: fix macro

Michael Tretter m.tretter at pengutronix.de
Thu Sep 3 09:12:43 PDT 2026


The argument x of the macro is not used, but the macro uses i instead,
which works, because i is defined, when the macro is used.

Fix this by using the proper argument names.

While at it, simplify the macro and fix the formatting.

Signed-off-by: Michael Tretter <m.tretter at pengutronix.de>
---
 arch/arm/mach-socfpga/iossm_mailbox.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-socfpga/iossm_mailbox.c b/arch/arm/mach-socfpga/iossm_mailbox.c
index b79ec87b4f46..b66056a91279 100644
--- a/arch/arm/mach-socfpga/iossm_mailbox.c
+++ b/arch/arm/mach-socfpga/iossm_mailbox.c
@@ -18,11 +18,14 @@
 
 #define ECC_INTSTATUS_SERR SOCFPGA_SYSMGR_ADDRESS + 0x9C
 #define ECC_INISTATUS_DERR SOCFPGA_SYSMGR_ADDRESS + 0xA0
+
 #define DDR_CSR_CLKGEN_LOCKED_IO96B0_MASK BIT(16)
 #define DDR_CSR_CLKGEN_LOCKED_IO96B1_MASK BIT(17)
+#define DDR_CSR_CLKGEN_LOCKED_IO96B_MASK(i)		\
+	(i == 0 ?					\
+	 DDR_CSR_CLKGEN_LOCKED_IO96B0_MASK :		\
+	 DDR_CSR_CLKGEN_LOCKED_IO96B1_MASK)
 
-#define DDR_CSR_CLKGEN_LOCKED_IO96B_MASK(x)	(i == 0 ? DDR_CSR_CLKGEN_LOCKED_IO96B0_MASK : \
-							DDR_CSR_CLKGEN_LOCKED_IO96B1_MASK)
 #define MAX_RETRY_COUNT 3
 #define NUM_CMD_RESPONSE_DATA 3
 

-- 
2.47.3




More information about the barebox mailing list