Skip to content

Commit

Permalink
drivers: flash: spi_nor: fix few printf format warnings
Browse files Browse the repository at this point in the history
Fix few printf format warnings when building for
mpfs_icicle/polarfire/e51. PRIdPTR for the pointer difference, %zu for
size_t.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
  • Loading branch information
fabiobaltieri authored and kartben committed Feb 28, 2025
1 parent 3543a23 commit 9d5ebb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/flash/spi_nor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ static int spi_nor_process_sfdp(const struct device *dev)
while (php != phpe) {
uint16_t id = jesd216_param_id(php);

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

Expand Down Expand Up @@ -1405,7 +1405,7 @@ static int setup_pages_layout(const struct device *dev)

data->layout.pages_size = layout_page_size;
data->layout.pages_count = flash_size / layout_page_size;
LOG_DBG("layout %u x %u By pages", data->layout.pages_count, data->layout.pages_size);
LOG_DBG("layout %zu x %zu By pages", data->layout.pages_count, data->layout.pages_size);
#elif defined(CONFIG_SPI_NOR_SFDP_DEVICETREE)
const struct spi_nor_config *cfg = dev->config;
const struct flash_pages_layout *layout = &cfg->layout;
Expand Down

0 comments on commit 9d5ebb3

Please sign in to comment.