From 1fc51b3eeb3f58c4c794a2745cdf57fe55a37a74 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Wed, 25 Nov 2020 16:46:16 +0900 Subject: [PATCH] arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c: Fix syslog formats --- arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c index 5a080ef2b5..4e030b5403 100644 --- a/arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c +++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -463,7 +464,7 @@ static uint32_t ssp_setfrequency(FAR struct spi_dev_s *dev, priv->frequency = frequency; priv->actual = actual; - spiinfo("Frequency %d->%d\n", frequency, actual); + spiinfo("Frequency %" PRId32 "->%" PRId32 "\n", frequency, actual); return actual; } @@ -604,7 +605,7 @@ static uint32_t ssp_send(FAR struct spi_dev_s *dev, uint32_t wd) /* Get the value from the RX FIFO and return it */ regval = ssp_getreg(priv, LPC17_40_SSP_DR_OFFSET); - spiinfo("%04x->%04x\n", wd, regval); + spiinfo("%04" PRId32 "->%04" PRId32 "\n", wd, regval); return regval; } @@ -739,7 +740,7 @@ static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, * has occurred) */ - spiinfo("nwords: %d\n", nwords); + spiinfo("nwords: %zd\n", nwords); u.pv = buffer; while (nwords || rxpending) { @@ -749,7 +750,7 @@ static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, * and (3) there are more bytes to be sent. */ - spiinfo("TX: rxpending: %d nwords: %d\n", rxpending, nwords); + spiinfo("TX: rxpending: %" PRId32 " nwords: %zd\n", rxpending, nwords); while ((ssp_getreg(priv, LPC17_40_SSP_SR_OFFSET) & SSP_SR_TNF) && (rxpending < LPC17_40_SSP_FIFOSZ) && nwords) { @@ -762,7 +763,7 @@ static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, * not empty. */ - spiinfo("RX: rxpending: %d\n", rxpending); + spiinfo("RX: rxpending: %" PRId32 "\n", rxpending); while (ssp_getreg(priv, LPC17_40_SSP_SR_OFFSET) & SSP_SR_RNE) { data = (uint8_t)ssp_getreg(priv, LPC17_40_SSP_DR_OFFSET);