Skip to content

Commit 91cf42c

Browse files
committed
drivers: flash: spi_nor: fix few printf format warnings again
Looks like 9d5ebb3 introduced a new warning when building with runtime sfdp on 32 bit platforms. Fix it for good by just casting the operation to int and go back to use %u. Tested with: west build -p -b gd32f450z_eval samples/drivers/flash_shell \ -DCONFIG_SPI_NOR_SFDP_RUNTIME=y west build -p -b mpfs_icicle/polarfire/u54 samples/drivers/flash_shell Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
1 parent 24ae278 commit 91cf42c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/flash/spi_nor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,8 +1279,8 @@ static int spi_nor_process_sfdp(const struct device *dev)
12791279
while (php != phpe) {
12801280
uint16_t id = jesd216_param_id(php);
12811281

1282-
LOG_INF("PH%" PRIdPTR ": %04x rev %u.%u: %u DW @ %x",
1283-
(php - hp->phdr), id, php->rev_major, php->rev_minor,
1282+
LOG_INF("PH%u: %04x rev %u.%u: %u DW @ %x",
1283+
(int)(php - hp->phdr), id, php->rev_major, php->rev_minor,
12841284
php->len_dw, jesd216_param_addr(php));
12851285

12861286
if (id == JESD216_SFDP_PARAM_ID_BFP) {

0 commit comments

Comments
 (0)