Skip to content

Commit e8fe241

Browse files
rruuaanngkartben
authored andcommitted
dts: Improve readability of DT_xxx_M macro
Change '(x) * num' to reuse DT_xxx_K macro. Signed-off-by: James Roy <[email protected]>
1 parent ad7d808 commit e8fe241

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dts/common/freq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
#define __DT_FREQ_H
99

1010
#define DT_FREQ_K(x) ((x) * 1000)
11-
#define DT_FREQ_M(x) ((x) * 1000 * 1000)
11+
#define DT_FREQ_M(x) (DT_FREQ_K(x) * 1000)
1212

1313
#endif /* __DT_FREQ_H */

dts/common/mem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#define __DT_MEM_H
99

1010
#define DT_SIZE_K(x) ((x) * 1024)
11-
#define DT_SIZE_M(x) ((x) * 1024 * 1024)
11+
#define DT_SIZE_M(x) (DT_SIZE_K(x) * 1024)
1212

1313
/* concatenate the values of the arguments into one */
1414
#define _DT_DO_CONCAT(x, y) x ## y

0 commit comments

Comments
 (0)