From e8fe241859949b22fae19b71258d319fc07f0081 Mon Sep 17 00:00:00 2001 From: James Roy Date: Tue, 24 Dec 2024 13:33:51 +0800 Subject: [PATCH] dts: Improve readability of DT_xxx_M macro Change '(x) * num' to reuse DT_xxx_K macro. Signed-off-by: James Roy --- dts/common/freq.h | 2 +- dts/common/mem.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dts/common/freq.h b/dts/common/freq.h index b6e83b37716..a232646eead 100644 --- a/dts/common/freq.h +++ b/dts/common/freq.h @@ -8,6 +8,6 @@ #define __DT_FREQ_H #define DT_FREQ_K(x) ((x) * 1000) -#define DT_FREQ_M(x) ((x) * 1000 * 1000) +#define DT_FREQ_M(x) (DT_FREQ_K(x) * 1000) #endif /* __DT_FREQ_H */ diff --git a/dts/common/mem.h b/dts/common/mem.h index 49c23c69f32..f86ce61ee8d 100644 --- a/dts/common/mem.h +++ b/dts/common/mem.h @@ -8,7 +8,7 @@ #define __DT_MEM_H #define DT_SIZE_K(x) ((x) * 1024) -#define DT_SIZE_M(x) ((x) * 1024 * 1024) +#define DT_SIZE_M(x) (DT_SIZE_K(x) * 1024) /* concatenate the values of the arguments into one */ #define _DT_DO_CONCAT(x, y) x ## y