drivers/mtd/mx25rxx.c: Fix syslog formats
This commit is contained in:
parent
f97f6a6a36
commit
5749599b0b
@ -43,6 +43,7 @@
|
||||
#include <nuttx/config.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@ -304,7 +305,7 @@ int mx25rxx_command_write(FAR struct qspi_dev_s *qspi, uint8_t cmd,
|
||||
{
|
||||
struct qspi_cmdinfo_s cmdinfo;
|
||||
|
||||
finfo("CMD: %02x buflen: %lu 0x%x\n",
|
||||
finfo("CMD: %02x buflen: %lu 0x%" PRIx32 "\n",
|
||||
cmd, (unsigned long)buflen, *(FAR uint32_t *)buffer);
|
||||
|
||||
cmdinfo.flags = QSPICMD_WRITEDATA;
|
||||
@ -412,8 +413,8 @@ int mx25rxx_write_page(struct mx25rxx_dev_s *priv, FAR const uint8_t *buffer,
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
ferr("ERROR: QSPI_MEMORY failed writing address=%06x\n",
|
||||
address);
|
||||
ferr("ERROR: QSPI_MEMORY failed writing address=%06jx\n",
|
||||
(intmax_t)address);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -750,7 +751,9 @@ int mx25rxx_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
|
||||
#endif
|
||||
ret = OK;
|
||||
|
||||
finfo("blocksize: %d erasesize: %d neraseblocks: %d\n",
|
||||
finfo("blocksize: %" PRId32
|
||||
" erasesize: %" PRId32
|
||||
" neraseblocks: %" PRId32 "\n",
|
||||
geo->blocksize, geo->erasesize, geo->neraseblocks);
|
||||
}
|
||||
}
|
||||
@ -879,8 +882,8 @@ static FAR uint8_t *mx25rxx_read_cache(struct mx25rxx_dev_s *priv, off_t sector)
|
||||
|
||||
shift = priv->sectorshift - MX25RXX_SECTOR512_SHIFT;
|
||||
esectno = sector >> shift;
|
||||
finfo("sector: %ld esectno: %d (%d) shift=%d\n",
|
||||
sector, esectno, priv->esectno, shift);
|
||||
finfo("sector: %jd esectno: %jd (%d) shift=%d\n",
|
||||
(intmax_t)sector, (intmax_t)esectno, priv->esectno, shift);
|
||||
|
||||
/* Check if the requested erase block is already in the cache */
|
||||
|
||||
@ -948,7 +951,8 @@ static void mx25rxx_erase_cache(struct mx25rxx_dev_s *priv, off_t sector)
|
||||
if (!IS_ERASED(priv))
|
||||
{
|
||||
off_t esectno = sector >> (priv->sectorshift - MX25RXX_SECTOR512_SHIFT);
|
||||
finfo("sector: %ld esectno: %d\n", sector, esectno);
|
||||
finfo("sector: %jd esectno: %jd\n",
|
||||
(intmax_t)sector, (intmax_t)esectno);
|
||||
|
||||
DEBUGVERIFY(mx25rxx_erase_sector(priv, esectno));
|
||||
SET_ERASED(priv);
|
||||
@ -992,7 +996,8 @@ static int mx25rxx_write_cache(FAR struct mx25rxx_dev_s *priv,
|
||||
if (!IS_ERASED(priv))
|
||||
{
|
||||
off_t esectno = sector >> (priv->sectorshift - MX25RXX_SECTOR512_SHIFT);
|
||||
finfo("sector: %ld esectno: %d\n", sector, esectno);
|
||||
finfo("sector: %jd esectno: %jd\n",
|
||||
(intmax_t)sector, (intmax_t)esectno);
|
||||
|
||||
ret = mx25rxx_erase_sector(priv, esectno);
|
||||
if (ret < 0)
|
||||
@ -1011,8 +1016,9 @@ static int mx25rxx_write_cache(FAR struct mx25rxx_dev_s *priv,
|
||||
|
||||
/* Set up for the next 512 byte sector */
|
||||
|
||||
finfo("address: %08x nbytes: %d 0x%04x\n",
|
||||
sector << MX25RXX_SECTOR512_SHIFT, MX25RXX_SECTOR512_SIZE,
|
||||
finfo("address: %08jx nbytes: %d 0x%04" PRIx32 "\n",
|
||||
(intmax_t)(sector << MX25RXX_SECTOR512_SHIFT),
|
||||
MX25RXX_SECTOR512_SIZE,
|
||||
*(FAR uint32_t *)buffer);
|
||||
buffer += MX25RXX_SECTOR512_SIZE;
|
||||
sector++;
|
||||
|
Loading…
Reference in New Issue
Block a user