devicetree: make DT_..._REG_ADDR return unsigned

`DT_..._REG_ADDR` macros do not always return an unsigned value. This
commit adds and unsigned 32bit prefix to ensure the value is always
unsigned.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
Fabio Baltieri 2024-09-20 13:01:04 +00:00 committed by Fabio Baltieri
commit f98fde07b3
11 changed files with 84 additions and 23 deletions

View file

@ -2948,7 +2948,7 @@ ZTEST(devicetree_api, test_fixed_partitions)
* Test this by way of string comparison.
*/
zassert_true(!strcmp(TO_STRING(DT_FIXED_PARTITION_ADDR(TEST_PARTITION_2)),
"(__REG_IDX_0_VAL_ADDRESS + 458624)"));
"(__REG_IDX_0_VAL_ADDRESSU + 458624U)"));
zassert_equal(DT_REG_ADDR(TEST_PARTITION_2), 458624);
/* Test that all DT_FIXED_PARTITION_ID are defined and unique. */