Skip to content

Commit 09a643e

Browse files
fabiobaltierimmahadevan108
authored andcommitted
devicetree: make DT_..._REG_SIZE return unsigned
Simiarly to f98fde0, make the SIZE macros return unsigned literal values. Signed-off-by: Fabio Baltieri <[email protected]>
1 parent 8068cb2 commit 09a643e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

doc/releases/migration-guide-4.0.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Devicetree
4343
* The :c:macro:`DT_REG_ADDR` macro and its variants are now expanding into an
4444
unsigned literals (i.e. with a ``U`` suffix). To use addresses as devicetree
4545
indexes use the :c:macro:`DT_REG_ADDR_RAW` variants.
46+
* The :c:macro:`DT_REG_SIZE` macro and its variants are also expanding into
47+
unsigned literals, no raw variants are provided at this stage.
4648

4749
STM32
4850
=====

include/zephyr/devicetree.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2292,7 +2292,7 @@
22922292
* @return size of the idx-th register block
22932293
*/
22942294
#define DT_REG_SIZE_BY_IDX(node_id, idx) \
2295-
DT_CAT4(node_id, _REG_IDX_, idx, _VAL_SIZE)
2295+
DT_U32_C(DT_CAT4(node_id, _REG_IDX_, idx, _VAL_SIZE))
22962296

22972297
/**
22982298
* @brief Get a node's (only) register block address
@@ -2367,7 +2367,7 @@
23672367
* @return size of the register block specified by name
23682368
*/
23692369
#define DT_REG_SIZE_BY_NAME(node_id, name) \
2370-
DT_CAT4(node_id, _REG_NAME_, name, _VAL_SIZE)
2370+
DT_U32_C(DT_CAT4(node_id, _REG_NAME_, name, _VAL_SIZE))
23712371

23722372
/**
23732373
* @brief Like DT_REG_SIZE_BY_NAME(), but with a fallback to @p default_value

0 commit comments

Comments
 (0)