mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
drivers/mtd/mx25rxx.c: Fix syslog formats
This commit is contained in:
committed by
Xiang Xiao
parent
f97f6a6a36
commit
5749599b0b
+16
-10
@@ -43,6 +43,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
#include <inttypes.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.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;
|
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);
|
cmd, (unsigned long)buflen, *(FAR uint32_t *)buffer);
|
||||||
|
|
||||||
cmdinfo.flags = QSPICMD_WRITEDATA;
|
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)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
ferr("ERROR: QSPI_MEMORY failed writing address=%06x\n",
|
ferr("ERROR: QSPI_MEMORY failed writing address=%06jx\n",
|
||||||
address);
|
(intmax_t)address);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -750,7 +751,9 @@ int mx25rxx_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
|
|||||||
#endif
|
#endif
|
||||||
ret = OK;
|
ret = OK;
|
||||||
|
|
||||||
finfo("blocksize: %d erasesize: %d neraseblocks: %d\n",
|
finfo("blocksize: %" PRId32
|
||||||
|
" erasesize: %" PRId32
|
||||||
|
" neraseblocks: %" PRId32 "\n",
|
||||||
geo->blocksize, geo->erasesize, geo->neraseblocks);
|
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;
|
shift = priv->sectorshift - MX25RXX_SECTOR512_SHIFT;
|
||||||
esectno = sector >> shift;
|
esectno = sector >> shift;
|
||||||
finfo("sector: %ld esectno: %d (%d) shift=%d\n",
|
finfo("sector: %jd esectno: %jd (%d) shift=%d\n",
|
||||||
sector, esectno, priv->esectno, shift);
|
(intmax_t)sector, (intmax_t)esectno, priv->esectno, shift);
|
||||||
|
|
||||||
/* Check if the requested erase block is already in the cache */
|
/* 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))
|
if (!IS_ERASED(priv))
|
||||||
{
|
{
|
||||||
off_t esectno = sector >> (priv->sectorshift - MX25RXX_SECTOR512_SHIFT);
|
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));
|
DEBUGVERIFY(mx25rxx_erase_sector(priv, esectno));
|
||||||
SET_ERASED(priv);
|
SET_ERASED(priv);
|
||||||
@@ -992,7 +996,8 @@ static int mx25rxx_write_cache(FAR struct mx25rxx_dev_s *priv,
|
|||||||
if (!IS_ERASED(priv))
|
if (!IS_ERASED(priv))
|
||||||
{
|
{
|
||||||
off_t esectno = sector >> (priv->sectorshift - MX25RXX_SECTOR512_SHIFT);
|
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);
|
ret = mx25rxx_erase_sector(priv, esectno);
|
||||||
if (ret < 0)
|
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 */
|
/* Set up for the next 512 byte sector */
|
||||||
|
|
||||||
finfo("address: %08x nbytes: %d 0x%04x\n",
|
finfo("address: %08jx nbytes: %d 0x%04" PRIx32 "\n",
|
||||||
sector << MX25RXX_SECTOR512_SHIFT, MX25RXX_SECTOR512_SIZE,
|
(intmax_t)(sector << MX25RXX_SECTOR512_SHIFT),
|
||||||
|
MX25RXX_SECTOR512_SIZE,
|
||||||
*(FAR uint32_t *)buffer);
|
*(FAR uint32_t *)buffer);
|
||||||
buffer += MX25RXX_SECTOR512_SIZE;
|
buffer += MX25RXX_SECTOR512_SIZE;
|
||||||
sector++;
|
sector++;
|
||||||
|
|||||||
Reference in New Issue
Block a user