You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/25 06:31:43 UTC

[incubator-nuttx] branch master updated (09778c3 -> 40ff30e)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from 09778c3  rptun: fix rptun rpmsg_unregister_callback fault
     new 67ea358  arch/risc-v/src/litex/litex_schedulesigaction.c: Fix syslog formats
     new e0d535c  arch/risc-v/src/common/riscv_createstack.c: Fix a syslog format
     new 4db092b  arch/avr/src/avr/up_spi.c: Fix syslog formats
     new 66686ab  arch/arm/src/stm32/stm32f40xxx_i2c.c: Fix syslog formats
     new efc09bf  arch/arm/src/stm32/stm32_ltdc.c: Appease nxstyle
     new 4f6c995  arch/arm/src/stm32/stm32_ltdc.c: Fix syslog formats
     new d289fd9  arch/arm/src/stm32/stm32_dma2d.c: Appease nxstyle
     new 7b31315  arch/arm/src/stm32/stm32_dma2d.c: Fix syslog formats
     new 048e1aa  boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c: Appease nxstyle
     new b6217b2  boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c: Fix syslog formats
     new 78c03c8  graphics/nxterm/nxterm_kbdin.c: Fix a syslog format
     new f8da954  drivers/sensors/sensor.c: Fix a syslog format
     new 7b3cd14  net/ieee802154/ieee802154_sockif.c: Fix a syslog format
     new 2982996  net/ieee802154/ieee802154_sendto.c: Fix a syslog format
     new 4911b11  fs/cromfs/fs_cromfs.c: Fix a syslog format
     new 634713c  net/tcp/tcp_sendfile.c: Fix syslog formats
     new ff6201f  net/udp/udp_sendto_buffered.c: Fix a syslog format
     new c0b4076  fs/userfs/fs_userfs.c: Fix syslog formats
     new 88bc46f  fs/spiffs/src/spiffs_vfs.c: Fix syslog formats
     new a6b4c1b  fs/spiffs/src/spiffs_core.c: Fix syslog formats
     new be013cc  fs/spiffs/src/spiffs_gc.c: Fix syslog formats
     new 0dee215  fs/spiffs/src/spiffs_mtd.c: Fix syslog formats
     new b299fdf  arch/arm/src/stm32f7/stm32_ethernet.c: Fix syslog formats
     new 5706e38  drivers/wireless/lpwan/sx127x/sx127x.c: Fix syslog formats
     new fc76157  arch/arm/src/stm32f0l0g0/stm32_spi.c: Fix syslog formats
     new 597675b  drivers/mmcsd/mmcsd_sdio.c: Fix a syslog format
     new a70961e  arch/arm/src/stm32f0l0g0/stm32_adc.c: Fix syslog formats
     new 40ff30e  boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_ssd1306.c: Fix a syslog format

The 28 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/arm/src/stm32/stm32_dma2d.c                   |  91 ++++++++-------
 arch/arm/src/stm32/stm32_ltdc.c                    | 122 ++++++++++++---------
 arch/arm/src/stm32/stm32f40xxx_i2c.c               |  14 ++-
 arch/arm/src/stm32f0l0g0/stm32_adc.c               |   9 +-
 arch/arm/src/stm32f0l0g0/stm32_spi.c               |   6 +-
 arch/arm/src/stm32f7/stm32_ethernet.c              |  14 ++-
 arch/avr/src/avr/up_spi.c                          |   3 +-
 arch/risc-v/src/common/riscv_createstack.c         |   2 +-
 arch/risc-v/src/litex/litex_schedulesigaction.c    |   7 +-
 .../stm32/stm32f429i-disco/src/stm32_ili93414ws.c  |  90 ++++++++-------
 .../stm32f0l0g0/b-l072z-lrwan1/src/stm32_ssd1306.c |   2 +-
 drivers/mmcsd/mmcsd_sdio.c                         |   4 +-
 drivers/sensors/sensor.c                           |   2 +-
 drivers/wireless/lpwan/sx127x/sx127x.c             |   5 +-
 fs/cromfs/fs_cromfs.c                              |   2 +-
 fs/spiffs/src/spiffs_core.c                        |  53 ++++-----
 fs/spiffs/src/spiffs_gc.c                          |   4 +-
 fs/spiffs/src/spiffs_mtd.c                         |  24 ++--
 fs/spiffs/src/spiffs_vfs.c                         |  11 +-
 fs/userfs/fs_userfs.c                              |   4 +-
 graphics/nxterm/nxterm_kbdin.c                     |   3 +-
 net/ieee802154/ieee802154_sendto.c                 |   2 +-
 net/ieee802154/ieee802154_sockif.c                 |   5 +-
 net/tcp/tcp_sendfile.c                             |  11 +-
 net/udp/udp_sendto_buffered.c                      |   2 +-
 25 files changed, 276 insertions(+), 216 deletions(-)


[incubator-nuttx] 25/28: arch/arm/src/stm32f0l0g0/stm32_spi.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit fc76157d4ab8659c2bcc38280363c45373931c7c
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 10:39:06 2020 +0900

    arch/arm/src/stm32f0l0g0/stm32_spi.c: Fix syslog formats
---
 arch/arm/src/stm32f0l0g0/stm32_spi.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/stm32f0l0g0/stm32_spi.c b/arch/arm/src/stm32f0l0g0/stm32_spi.c
index 7353d36..902a72a 100644
--- a/arch/arm/src/stm32f0l0g0/stm32_spi.c
+++ b/arch/arm/src/stm32f0l0g0/stm32_spi.c
@@ -56,6 +56,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <stddef.h>
@@ -1000,7 +1001,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev,
        * will be faster.
        */
 
-      spiinfo("Frequency %d->%d\n", frequency, actual);
+      spiinfo("Frequency %" PRId32 "->% " PRId32 "\n", frequency, actual);
 
       priv->frequency = frequency;
       priv->actual    = actual;
@@ -1266,7 +1267,8 @@ static uint32_t spi_send(FAR struct spi_dev_s *dev, uint32_t wd)
 
   regval = spi_getreg(priv, STM32_SPI_SR_OFFSET);
 
-  spiinfo("Sent: %04x Return: %04x Status: %02x\n", wd, ret, regval);
+  spiinfo("Sent: %04" PRIx32 " Return: %04" PRIx32
+          " Status: %02" PRIx32 "\n", wd, ret, regval);
   UNUSED(regval);
 
   return ret;


[incubator-nuttx] 01/28: arch/risc-v/src/litex/litex_schedulesigaction.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 67ea358f96648ba0a58d6e550354a7e702af50a0
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 24 07:08:23 2020 +0900

    arch/risc-v/src/litex/litex_schedulesigaction.c: Fix syslog formats
---
 arch/risc-v/src/litex/litex_schedulesigaction.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/risc-v/src/litex/litex_schedulesigaction.c b/arch/risc-v/src/litex/litex_schedulesigaction.c
index 1aa2ccc..738dbef 100644
--- a/arch/risc-v/src/litex/litex_schedulesigaction.c
+++ b/arch/risc-v/src/litex/litex_schedulesigaction.c
@@ -24,6 +24,7 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <sched.h>
 #include <debug.h>
@@ -148,7 +149,8 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
 
               up_savestate(tcb->xcp.regs);
 
-              sinfo("PC/STATUS Saved: %08x/%08x New: %08x/%08x\n",
+              sinfo("PC/STATUS Saved: %08" PRIx32 "/%08" PRIx32
+                    " New: %08" PRIx32 "/%08" PRIx32 "\n",
                     tcb->xcp.saved_epc, tcb->xcp.saved_int_ctx,
                     g_current_regs[REG_EPC], g_current_regs[REG_INT_CTX]);
             }
@@ -182,7 +184,8 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
 
           tcb->xcp.regs[REG_INT_CTX]  = int_ctx;
 
-          sinfo("PC/STATUS Saved: %08x/%08x New: %08x/%08x\n",
+          sinfo("PC/STATUS Saved: %08" PRIx32 "/%08" PRIx32
+                " New: %08" PRIx32 "/%08" PRIx32 "\n",
                 tcb->xcp.saved_epc, tcb->xcp.saved_int_ctx,
                 tcb->xcp.regs[REG_EPC], tcb->xcp.regs[REG_INT_CTX]);
         }


[incubator-nuttx] 09/28: boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c: Appease nxstyle

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 048e1aab9cafea868c2beabaf711f91307b954ea
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 24 08:57:01 2020 +0900

    boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c: Appease nxstyle
---
 .../stm32/stm32f429i-disco/src/stm32_ili93414ws.c  | 83 ++++++++++++----------
 1 file changed, 44 insertions(+), 39 deletions(-)

diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c b/boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c
index 82f183f..030fc5e 100644
--- a/boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c
+++ b/boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c
@@ -109,8 +109,7 @@
 #  define ILI93414WS_BAUD_DIVISOR   256
 #endif
 
-/*
- * Permitted clock delay for a pixel transmission from the LCD gram.
+/* Permitted clock delay for a pixel transmission from the LCD gram.
  * Calculated by cpu clock / (spi clock / baud divisor)
  */
 
@@ -126,9 +125,10 @@
 #define ILI93414WS_SPI_SR           (ILI93414WS_SPI_BASE + STM32_SPI_SR_OFFSET)
 #define ILI93414WS_SPI_DR           (ILI93414WS_SPI_BASE + STM32_SPI_DR_OFFSET)
 
-/* Activates the usage of the spi interface structure if several active devices
- * connected on the SPI5 bus, e.g. LCD Display, MEMS. This will perform locking
- * of the spi bus by SPI_LOCK at each selection of the SPI5 device.
+/* Activates the usage of the spi interface structure if several active
+ * devices connected on the SPI5 bus, e.g. LCD Display, MEMS. This will
+ * perform locking of the spi bus by SPI_LOCK at each selection of the SPI5
+ * device.
  */
 
 #ifdef CONFIG_STM32_SPI5
@@ -474,20 +474,19 @@ static int stm32_ili93414ws_sendblock(FAR struct ili93414ws_lcd_s *lcd,
     {
       /* 8-bit spi mode */
 
-      const uint8_t *src  = (const uint8_t*)wd;
-            uint8_t word;
+      const uint8_t *src = (const uint8_t *)wd;
+      uint8_t word;
 
       while (nwords-- > 0)
         {
           word = *src++;
           stm32_ili93414ws_sndword((uint16_t)word);
         }
-
     }
 
-  /* Wait until transmit is not busy after the last word is transmitted, marked
-   * by the BSY flag in the cr1 register. This is necessary if entering in halt
-   * mode or disable the spi periphery.
+  /* Wait until transmit is not busy after the last word is transmitted,
+   * marked by the BSY flag in the cr1 register. This is necessary if
+   * entering in halt mode or disable the spi periphery.
    */
 
   while ((getreg16(ILI93414WS_SPI_SR) & SPI_SR_BSY) != 0);
@@ -526,9 +525,9 @@ static uint16_t stm32_ili93414ws_recvword(void)
    * immediately after enabling it. If the pixel data stream is interrupted
    * during receiving, a synchronized transfer can not ensure. Especially on
    * higher frequency it can happen that the interrupted driver isn't fast
-   * enough to stop transmitting by disabling the spi device. So pixels lost but
-   * not recognized by the driver. This results in a big lock because the driver
-   * wants to receive missing pixel data.
+   * enough to stop transmitting by disabling the spi device. So pixels lost
+   * but not recognized by the driver. This results in a big lock because
+   * the driver wants to receive missing pixel data.
    * The critical section here ensures that the spi device is disabled fast
    * enough during a pixel is transmitted.
    */
@@ -541,9 +540,10 @@ static uint16_t stm32_ili93414ws_recvword(void)
 
   /* Enable spi device followed by disable the spi device.
    *
-   * Ensure that the spi is disabled within 8 or 16 spi clock cycles depending
-   * on the configured spi bit mode. This is necessary to prevent that the next
-   * data word is transmitted by the slave before the RX buffer is cleared.
+   * Ensure that the spi is disabled within 8 or 16 spi clock cycles
+   * depending on the configured spi bit mode. This is necessary to prevent
+   * that the next data word is transmitted by the slave before the RX
+   * buffer is cleared.
    * Otherwise the RX buffer will be overwritten.
    *
    * Physically the spi clock is disabled after the current 8/16 clock cycles
@@ -562,12 +562,13 @@ static uint16_t stm32_ili93414ws_recvword(void)
 
   leave_critical_section(flags);
 
-  /* Waits until the RX buffer is filled with the received data word signalized
-   * by the spi hardware through the RXNE flag.
+  /* Waits until the RX buffer is filled with the received data word
+   * signalized by the spi hardware through the RXNE flag.
    * A busy loop is preferred against interrupt driven receiving method here
-   * because this happened fairly often. Also we have to ensure to avoid a big
-   * lock if the lcd driver doesn't send data anymore.
-   * A latency of CPU clock / SPI clock * 16 SPI clocks should be enough here.
+   * because this happened fairly often. Also we have to ensure to avoid a
+   * big lock if the lcd driver doesn't send data anymore.
+   * A latency of CPU clock / SPI clock * 16 SPI clocks should be enough
+   * here.
    */
 
   for (n = 0; n < ILI93414WS_RECV_CLK * 16; n++)
@@ -634,9 +635,11 @@ static int stm32_ili93414ws_recvblock(FAR struct ili93414ws_lcd_s *lcd,
           /* Discard the first 8 bit dummy */
 
           /* 00000000 RRRRRR00 */
+
           w1 = stm32_ili93414ws_recvword();
 
           /* GGGGGG00 BBBBBB00 */
+
           w2 = stm32_ili93414ws_recvword();
 
           *dest++ = (((w1 << 8) & 0xf800) |
@@ -696,7 +699,10 @@ static int stm32_ili93414ws_recvblock(FAR struct ili93414ws_lcd_s *lcd,
 
       while (nwords--)
         {
-          uint8_t r, g, b;
+          uint8_t r;
+          uint8_t g;
+          uint8_t b;
+
           r = (uint8_t)(stm32_ili93414ws_recvword() >> 3);
           g = (uint8_t)(stm32_ili93414ws_recvword() >> 2);
           b = (uint8_t)(stm32_ili93414ws_recvword() >> 3);
@@ -708,7 +714,7 @@ static int stm32_ili93414ws_recvblock(FAR struct ili93414ws_lcd_s *lcd,
     {
       /* 8-bit mode */
 
-      uint8_t *dest  = (uint8_t*)wd;
+      uint8_t *dest = (uint8_t *)wd;
 
       while (nwords--)
         {
@@ -792,19 +798,18 @@ static void stm32_ili93414ws_spiconfig(FAR struct ili9341_lcd_s *lcd)
   FAR struct ili93414ws_lcd_s *priv = (FAR struct ili93414ws_lcd_s *)lcd;
   irqstate_t   flags;
 
-  uint16_t   clrbitscr1 = SPI_CR1_CPHA|SPI_CR1_CPOL|SPI_CR1_BR_MASK|
-                          SPI_CR1_CRCEN|SPI_CR1_LSBFIRST|SPI_CR1_RXONLY|
+  uint16_t   clrbitscr1 = SPI_CR1_CPHA | SPI_CR1_CPOL | SPI_CR1_BR_MASK |
+                          SPI_CR1_CRCEN | SPI_CR1_LSBFIRST | SPI_CR1_RXONLY |
                           SPI_CR1_DFF;
 
-  uint16_t   setbitscr1 = SPI_CR1_BIDIOE|SPI_CR1_BIDIMODE|SPI_CR1_MSTR|
-                          SPI_CR1_SSI|SPI_CR1_SSM|ILI93414WS_SPI_BR;
+  uint16_t   setbitscr1 = SPI_CR1_BIDIOE | SPI_CR1_BIDIMODE | SPI_CR1_MSTR |
+                          SPI_CR1_SSI | SPI_CR1_SSM | ILI93414WS_SPI_BR;
 
-  uint16_t   clrbitscr2 = SPI_CR2_TXEIE|SPI_CR2_RXNEIE|SPI_CR2_ERRIE|
-                          SPI_CR2_FRF|SPI_CR2_SSOE;
+  uint16_t   clrbitscr2 = SPI_CR2_TXEIE | SPI_CR2_RXNEIE | SPI_CR2_ERRIE |
+                          SPI_CR2_FRF | SPI_CR2_SSOE;
 
   uint16_t   setbitscr2 = 0;
 
-
   flags = enter_critical_section();
 
   /* Disable spi */
@@ -817,8 +822,8 @@ static void stm32_ili93414ws_spiconfig(FAR struct ili9341_lcd_s *lcd)
 
 #ifdef ILI93414WS_SPI
   /* Backup cr1 and cr2 register to be sure they will be usable
-   * by default spi interface. Disable spi device here is necessary at the time
-   * restoring the register during deselection.
+   * by default spi interface. Disable spi device here is necessary at the
+   * time restoring the register during deselection.
    */
 
   priv->cr2 = getreg16(ILI93414WS_SPI_CR2);
@@ -887,7 +892,8 @@ static inline void stm32_ili93414ws_cmddata(
  *
  ****************************************************************************/
 
-static int stm32_ili93414ws_backlight(FAR struct ili9341_lcd_s *lcd, int level)
+static int stm32_ili93414ws_backlight(FAR struct ili9341_lcd_s *lcd,
+                                      int level)
 {
   return OK;
 }
@@ -1104,7 +1110,7 @@ static int stm32_ili93414ws_recvparam(FAR struct ili9341_lcd_s *lcd,
 #endif
 
   lcdinfo("param=%04x\n", param);
-  return stm32_ili93414ws_recvblock(priv, (uint16_t*)param, 1);
+  return stm32_ili93414ws_recvblock(priv, (uint16_t *)param, 1);
 }
 
 /****************************************************************************
@@ -1147,8 +1153,8 @@ static int stm32_ili93414ws_recvgram(FAR struct ili9341_lcd_s *lcd,
  *
  * Returned Value:
  *   On success, this function returns a reference to the LCD control object
- *   for the specified ILI9341 LCD Single chip driver connected as 4 wire serial
- *   (spi). NULL is returned on any failure.
+ *   for the specified ILI9341 LCD Single chip driver connected as 4 wire
+ *   serial (spi). NULL is returned on any failure.
  *
  ****************************************************************************/
 
@@ -1194,7 +1200,7 @@ FAR struct ili9341_lcd_s *stm32_ili93414ws_initialize(void)
 
   /* Enable spi bus */
 
-  regval= getreg32(STM32_RCC_APB2ENR);
+  regval = getreg32(STM32_RCC_APB2ENR);
   regval |= RCC_APB2ENR_SPI5EN;
   putreg32(regval, STM32_RCC_APB2ENR);
 
@@ -1217,7 +1223,6 @@ FAR struct ili9341_lcd_s *stm32_ili93414ws_initialize(void)
   priv->dev.recvgram    = stm32_ili93414ws_recvgram;
   priv->dev.backlight   = stm32_ili93414ws_backlight;
 
-
   /* Configure to bidirectional transfer mode */
 
   lcdinfo("Configure spi device %d to bidirectional transfer mode\n",


[incubator-nuttx] 24/28: drivers/wireless/lpwan/sx127x/sx127x.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 5706e3851dbe8b2ab093e1c33d44724e5be6291e
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 10:36:35 2020 +0900

    drivers/wireless/lpwan/sx127x/sx127x.c: Fix syslog formats
---
 drivers/wireless/lpwan/sx127x/sx127x.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/wireless/lpwan/sx127x/sx127x.c b/drivers/wireless/lpwan/sx127x/sx127x.c
index 953d127..991e5c2 100644
--- a/drivers/wireless/lpwan/sx127x/sx127x.c
+++ b/drivers/wireless/lpwan/sx127x/sx127x.c
@@ -24,6 +24,7 @@
 
 #include <nuttx/config.h>
 #include <assert.h>
+#include <inttypes.h>
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
@@ -3833,7 +3834,7 @@ static int sx127x_frequency_set(FAR struct sx127x_dev_s *dev, uint32_t freq)
   uint32_t frf = 0;
   int      ret = OK;
 
-  wlinfo("frequency %d->%d\n", dev->freq, freq);
+  wlinfo("frequency %" PRId32 "->%" PRId32 "\n", dev->freq, freq);
 
   if (freq == dev->freq)
     {
@@ -4105,7 +4106,7 @@ static int sx127x_calibration(FAR struct sx127x_dev_s *dev, uint32_t freq)
    * 434 MHz.
    */
 
-  wlinfo("SX127X calibration for %d\n", freq);
+  wlinfo("SX127X calibration for %" PRId32 "\n", freq);
 
   /* Calibration is supported only in FSK/OOK mode */
 


[incubator-nuttx] 21/28: fs/spiffs/src/spiffs_gc.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit be013cc338cbbc6e7142b93220c642363ad857d7
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 08:13:37 2020 +0900

    fs/spiffs/src/spiffs_gc.c: Fix syslog formats
---
 fs/spiffs/src/spiffs_gc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/spiffs/src/spiffs_gc.c b/fs/spiffs/src/spiffs_gc.c
index 1413537..45358ea 100644
--- a/fs/spiffs/src/spiffs_gc.c
+++ b/fs/spiffs/src/spiffs_gc.c
@@ -652,7 +652,7 @@ static int spiffs_gc_clean(FAR struct spiffs_s *fs, int16_t blkndx)
                               spiffs_gcinfo(
                                 "Wrote page=%04x to objhdr entry=%04x\n",
                                 new_data_pgndx,
-                                SPIFFS_OBJNDX_ENTRY(fs, phdr.spndx));
+                                (int)SPIFFS_OBJNDX_ENTRY(fs, phdr.spndx));
                             }
                           else
                             {
@@ -666,7 +666,7 @@ static int spiffs_gc_clean(FAR struct spiffs_s *fs, int16_t blkndx)
                               spiffs_gcinfo(
                                 "Wrote page=%04x to objndx entry=%04x\n",
                                 new_data_pgndx,
-                                SPIFFS_OBJNDX_ENTRY(fs, phdr.spndx));
+                                (int)SPIFFS_OBJNDX_ENTRY(fs, phdr.spndx));
                             }
                         }
                     }


[incubator-nuttx] 20/28: fs/spiffs/src/spiffs_core.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit a6b4c1b7556c0da5aa578a4cfed30f10a08fd713
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 08:04:26 2020 +0900

    fs/spiffs/src/spiffs_core.c: Fix syslog formats
---
 fs/spiffs/src/spiffs_core.c | 53 ++++++++++++++++++++++++---------------------
 1 file changed, 28 insertions(+), 25 deletions(-)

diff --git a/fs/spiffs/src/spiffs_core.c b/fs/spiffs/src/spiffs_core.c
index 725424f..374eae0 100644
--- a/fs/spiffs/src/spiffs_core.c
+++ b/fs/spiffs/src/spiffs_core.c
@@ -1729,7 +1729,8 @@ ssize_t spiffs_fobj_append(FAR struct spiffs_s *fs,
   int ret = OK;
   int ret2;
 
-  finfo("Append %d bytes @ offs=%d of size=%d\n", len, offset, fobj->size);
+  finfo("Append %zu bytes @ offs=%jd of size=%jd\n",
+        len, (intmax_t)offset, (intmax_t)fobj->size);
 
   if (offset > fobj->size)
     {
@@ -1776,7 +1777,7 @@ ssize_t spiffs_fobj_append(FAR struct spiffs_s *fs,
             {
               /* Store previous object index page, unless first pass */
 
-              finfo("objid=%04x store objndx %04x:%04x, nwritten=%d\n",
+              finfo("objid=%04x store objndx %04x:%04x, nwritten=%zu\n",
                     fobj->objid, cur_objndx_pgndx, prev_objndx_spndx,
                     nwritten);
 
@@ -1833,7 +1834,7 @@ ssize_t spiffs_fobj_append(FAR struct spiffs_s *fs,
                         }
 
                       finfo("objid=%04x store new objhdr, "
-                            "%04x:%04x, nwritten=%d\n",
+                            "%04x:%04x, nwritten=%zu\n",
                             fobj->objid, new_objhdr_page, 0, nwritten);
                     }
                 }
@@ -1882,9 +1883,10 @@ ssize_t spiffs_fobj_append(FAR struct spiffs_s *fs,
                       return ret;
                     }
 
-                  finfo("objid=%04x store new size I %d in objhdr, "
-                        "%04x:%04x, nwritten=%d\n",
-                        fobj->objid, offset + nwritten, new_objhdr_page, 0,
+                  finfo("objid=%04x store new size I %jd in objhdr, "
+                        "%04x:%04x, nwritten=%zu\n",
+                        fobj->objid, (intmax_t)(offset + nwritten),
+                        new_objhdr_page, 0,
                         nwritten);
                 }
 
@@ -1963,7 +1965,7 @@ ssize_t spiffs_fobj_append(FAR struct spiffs_s *fs,
                                     cur_objndx_spndx, cur_objndx_pgndx, 0);
 
                   finfo("objid=%04x create objndx page, "
-                        "%04x:%04x, nwritten=%d\n",
+                        "%04x:%04x, nwritten=%zu\n",
                         fobj->objid, cur_objndx_pgndx, cur_objndx_spndx,
                         nwritten);
                 }
@@ -2053,8 +2055,8 @@ ssize_t spiffs_fobj_append(FAR struct spiffs_s *fs,
                                           &phdr, &data[nwritten], to_write,
                                           page_offs, 1, &data_page);
 
-          finfo("objid=%04x store new data page, %04x:%04x offset=%d, "
-                "len=%d nwritten=%d\n",
+          finfo("objid=%04x store new data page, %04x:%04x "
+                "offset=%" PRId32 ", len=%zu nwritten=%zu\n",
                 fobj->objid, data_page, data_spndx, page_offs, to_write,
                 nwritten);
         }
@@ -2095,8 +2097,8 @@ ssize_t spiffs_fobj_append(FAR struct spiffs_s *fs,
                                    to_write, &data[nwritten]);
 
           finfo("objid=%04x store to existing data page, "
-                "%04x:%04x offset=%d, "
-                "len=%d, nwritten=%d\n",
+                "%04x:%04x offset=%" PRId32 ", "
+                "len=%zu, nwritten=%zu\n",
                 fobj->objid, data_page, data_spndx, page_offs, to_write,
                 nwritten);
         }
@@ -2157,7 +2159,7 @@ ssize_t spiffs_fobj_append(FAR struct spiffs_s *fs,
        * index page, unless object header index page
        */
 
-      finfo("objid=%04x store objndx page, %04x:%04x, nwritten=%d\n",
+      finfo("objid=%04x store objndx page, %04x:%04x, nwritten=%zu\n",
             fobj->objid, cur_objndx_pgndx, cur_objndx_spndx, nwritten);
 
       ret2 = spiffs_page_index_check(fs, fobj, cur_objndx_pgndx,
@@ -2190,9 +2192,10 @@ ssize_t spiffs_fobj_append(FAR struct spiffs_s *fs,
                                        offset + nwritten,
                                        &new_objhdr_page);
 
-      finfo("objid=%04x store new size II %d in objhdr, %04x:%04x, "
-            "nwritten=%d, ret=%d\n",
-            fobj->objid, offset + nwritten, new_objhdr_page, 0, nwritten,
+      finfo("objid=%04x store new size II %jd in objhdr, %04x:%04x, "
+            "nwritten=%zu, ret=%d\n",
+            fobj->objid, (intmax_t)(offset + nwritten),
+            new_objhdr_page, 0, nwritten,
             ret2);
 
       if (ret2 < 0)
@@ -2215,7 +2218,7 @@ ssize_t spiffs_fobj_append(FAR struct spiffs_s *fs,
           objhdr->size = offset + nwritten;
 
           finfo("objid=%04x store fresh objhdr page, "
-                "%04x:%04x, nwritten=%d\n",
+                "%04x:%04x, nwritten=%zu\n",
                 fobj->objid, cur_objndx_pgndx, cur_objndx_spndx, nwritten);
 
           ret2 = spiffs_page_index_check(fs, fobj, cur_objndx_pgndx,
@@ -2256,7 +2259,7 @@ ssize_t spiffs_fobj_append(FAR struct spiffs_s *fs,
                                            &new_objhdr_page);
 
           finfo("objid=%04x store modified objhdr page, %04x:%04x, "
-                "nwritten=%d\n",
+                "nwritten=%zu\n",
                 fobj->objid, new_objhdr_page, 0, nwritten);
 
           if (ret2 < 0)
@@ -2350,7 +2353,7 @@ ssize_t spiffs_fobj_modify(FAR struct spiffs_s *fs,
                                                   &new_objhdr_pgndx);
 
                   finfo("Store modified objhdr page, "
-                        "%04x:%04x, nwritten=%d\n",
+                        "%04x:%04x, nwritten=%zu\n",
                         new_objhdr_pgndx, 0, nwritten);
 
                   if (ret < 0)
@@ -2381,7 +2384,7 @@ ssize_t spiffs_fobj_modify(FAR struct spiffs_s *fs,
                                          &new_objndx_pgndx);
 
                   finfo("Store previous modified objndx page, %04x:%04x, "
-                        "nwritten=%d\n",
+                        "nwritten=%zu\n",
                         new_objndx_pgndx, objndx->phdr.spndx, nwritten);
 
                   if (ret < 0)
@@ -2522,8 +2525,8 @@ ssize_t spiffs_fobj_modify(FAR struct spiffs_s *fs,
                                           ~SPIFFS_OBJID_NDXFLAG,
                                           &phdr, &data[nwritten], to_write,
                                           page_offs, 1, &data_pgndx);
-          finfo("Store new data page, %04x:%04x offset=%d, "
-                "len=%d, nwritten=%d\n",
+          finfo("Store new data page, %04x:%04x offset=%" PRId32 ", "
+                "len=%zu, nwritten=%zu\n",
                 data_pgndx, data_spndx, page_offs, to_write, nwritten);
         }
       else
@@ -2618,7 +2621,7 @@ ssize_t spiffs_fobj_modify(FAR struct spiffs_s *fs,
             }
 
           finfo("Store to existing data page, src=%04x, dest=%04x:%04x "
-                "offset=%d, len=%d, nwritten=%d\n",
+                "offset=%" PRId32 ", len=%zu, nwritten=%zu\n",
                 orig_data_pgndx, data_pgndx, data_spndx, page_offs,
                 to_write, nwritten);
         }
@@ -2693,7 +2696,7 @@ ssize_t spiffs_fobj_modify(FAR struct spiffs_s *fs,
                               fobj->objid, 0, cur_objndx_pgndx,
                               &new_objndx_pgndx);
 
-      finfo("Store modified objndx page, %04x:%04x, nwritten=%d\n",
+      finfo("Store modified objndx page, %04x:%04x, nwritten=%zu\n",
             new_objndx_pgndx, cur_objndx_spndx, nwritten);
 
       fobj->objndx_pgndx = new_objndx_pgndx;
@@ -2717,7 +2720,7 @@ ssize_t spiffs_fobj_modify(FAR struct spiffs_s *fs,
                                        fobj->objhdr_pgndx, fs->work, 0, 0,
                                        &new_objhdr_pgndx);
 
-      finfo("Store modified objhdr page, %04x:%04x, nwritten=%d\n",
+      finfo("Store modified objhdr page, %04x:%04x, nwritten=%zu\n",
             new_objhdr_pgndx, 0, nwritten);
 
       if (ret2 < 0)
@@ -3422,7 +3425,7 @@ ssize_t spiffs_object_read(FAR struct spiffs_s *fs,
       finfo("Read offset=%d rd=%d data spndx=%d is "
             "data_pgndx=%d addr=%" PRIu32 "\n",
             cur_offset, len_to_read, data_spndx, data_pgndx,
-            (SPIFFS_PAGE_TO_PADDR(fs, data_pgndx) +
+            (uint32_t)(SPIFFS_PAGE_TO_PADDR(fs, data_pgndx) +
              sizeof(struct spiffs_page_header_s) +
              (cur_offset % SPIFFS_DATA_PAGE_SIZE(fs))));
 


[incubator-nuttx] 26/28: drivers/mmcsd/mmcsd_sdio.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 597675bd7fb97c1a5a615bc1d014f5823b99449c
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 13:01:13 2020 +0900

    drivers/mmcsd/mmcsd_sdio.c: Fix a syslog format
---
 drivers/mmcsd/mmcsd_sdio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmcsd/mmcsd_sdio.c b/drivers/mmcsd/mmcsd_sdio.c
index 1d16a8a..600144c 100644
--- a/drivers/mmcsd/mmcsd_sdio.c
+++ b/drivers/mmcsd/mmcsd_sdio.c
@@ -2897,8 +2897,8 @@ static int mmcsd_read_csd(FAR struct mmcsd_state_s *priv)
   priv->nblocks = (buffer[215] << 24) | (buffer[214] << 16) |
                   (buffer[213] << 8) | buffer[212];
 
-  finfo("MMC ext CSD read succsesfully, number of block %d\n",
-         priv->nblocks);
+  finfo("MMC ext CSD read succsesfully, number of block %" PRId32 "\n",
+        priv->nblocks);
 
   /* Return value:  One sector read */
 


[incubator-nuttx] 23/28: arch/arm/src/stm32f7/stm32_ethernet.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit b299fdf1e3c62f4573faf42949ae1412a7559232
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 10:32:49 2020 +0900

    arch/arm/src/stm32f7/stm32_ethernet.c: Fix syslog formats
---
 arch/arm/src/stm32f7/stm32_ethernet.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/arch/arm/src/stm32f7/stm32_ethernet.c b/arch/arm/src/stm32f7/stm32_ethernet.c
index 4c4b205..a7509fd 100644
--- a/arch/arm/src/stm32f7/stm32_ethernet.c
+++ b/arch/arm/src/stm32f7/stm32_ethernet.c
@@ -39,6 +39,7 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <time.h>
@@ -1085,7 +1086,7 @@ static int stm32_transmit(struct stm32_ethmac_s *priv)
   txdesc  = priv->txhead;
   txfirst = txdesc;
 
-  ninfo("d_len: %d d_buf: %p txhead: %p tdes0: %08x\n",
+  ninfo("d_len: %d d_buf: %p txhead: %p tdes0: %08" PRIx32 "\n",
         priv->dev.d_len, priv->dev.d_buf, txdesc, txdesc->tdes0);
 
   DEBUGASSERT(txdesc && (txdesc->tdes0 & ETH_TDES0_OWN) == 0);
@@ -1751,7 +1752,7 @@ static int stm32_recvframe(struct stm32_ethmac_s *priv)
                * scanning logic, and continue scanning with the next frame.
                */
 
-              nwarn("WARNING: DROPPED RX descriptor errors: %08x\n",
+              nwarn("WARNING: DROPPED RX descriptor errors: %08" PRIx32 "\n",
                     rxdesc->rdes0);
               stm32_freesegment(priv, rxcurr, priv->segments);
             }
@@ -1995,7 +1996,8 @@ static void stm32_freeframe(struct stm32_ethmac_s *priv)
            * TX descriptors.
            */
 
-          ninfo("txtail: %p tdes0: %08x tdes2: %08x tdes3: %08x\n",
+          ninfo("txtail: %p tdes0: %08" PRIx32
+                " tdes2: %08" PRIx32 " tdes3: %08" PRIx32 "\n",
                 txdesc, txdesc->tdes0, txdesc->tdes2, txdesc->tdes3);
 
           DEBUGASSERT(txdesc->tdes2 != 0);
@@ -2474,8 +2476,10 @@ static int stm32_ifup(struct net_driver_s *dev)
 
 #ifdef CONFIG_NET_IPv4
   ninfo("Bringing up: %d.%d.%d.%d\n",
-        dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
-        (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
+        (int)(dev->d_ipaddr & 0xff),
+        (int)((dev->d_ipaddr >> 8) & 0xff),
+        (int)((dev->d_ipaddr >> 16) & 0xff),
+        (int)(dev->d_ipaddr >> 24));
 #endif
 #ifdef CONFIG_NET_IPv6
   ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",


[incubator-nuttx] 02/28: arch/risc-v/src/common/riscv_createstack.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit e0d535c31745508de673d4f1bc74a6f49d0109a4
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 24 07:13:01 2020 +0900

    arch/risc-v/src/common/riscv_createstack.c: Fix a syslog format
---
 arch/risc-v/src/common/riscv_createstack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/risc-v/src/common/riscv_createstack.c b/arch/risc-v/src/common/riscv_createstack.c
index 318f798..dd145a2 100644
--- a/arch/risc-v/src/common/riscv_createstack.c
+++ b/arch/risc-v/src/common/riscv_createstack.c
@@ -201,7 +201,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
 
       if (!tcb->stack_alloc_ptr)
         {
-          serr("ERROR: Failed to allocate stack, size %d\n", stack_size);
+          serr("ERROR: Failed to allocate stack, size %zu\n", stack_size);
         }
 #endif
     }


[incubator-nuttx] 17/28: net/udp/udp_sendto_buffered.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit ff6201fc0affc275a6c6ef0e14c479a71fd91b80
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 07:42:10 2020 +0900

    net/udp/udp_sendto_buffered.c: Fix a syslog format
---
 net/udp/udp_sendto_buffered.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/udp/udp_sendto_buffered.c b/net/udp/udp_sendto_buffered.c
index a251192..c35f56c 100644
--- a/net/udp/udp_sendto_buffered.c
+++ b/net/udp/udp_sendto_buffered.c
@@ -435,7 +435,7 @@ static uint16_t sendto_eventhandler(FAR struct net_driver_s *dev,
        */
 
       sndlen = wrb->wb_iob->io_pktlen;
-      ninfo("wrb=%p sndlen=%u\n", wrb, sndlen);
+      ninfo("wrb=%p sndlen=%zu\n", wrb, sndlen);
 
 #ifdef NEED_IPDOMAIN_SUPPORT
       /* If both IPv4 and IPv6 support are enabled, then we will need to


[incubator-nuttx] 28/28: boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_ssd1306.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 40ff30ed7116afa9ab8e2d15299ce4802c0d3ccd
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 13:46:26 2020 +0900

    boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_ssd1306.c: Fix a syslog format
---
 boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_ssd1306.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_ssd1306.c b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_ssd1306.c
index 450a741..89d6425 100644
--- a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_ssd1306.c
+++ b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_ssd1306.c
@@ -84,7 +84,7 @@ FAR struct lcd_dev_s *board_lcd_getdev(int devno)
   g_lcddev = ssd1306_initialize(g_i2c, NULL, devno);
   if (!g_lcddev)
     {
-      lcderr("ERROR: Failed to bind I2C port 1 to OLED %d: %d\n", devno);
+      lcderr("ERROR: Failed to bind I2C port 1 to OLED %d\n", devno);
     }
   else
     {


[incubator-nuttx] 05/28: arch/arm/src/stm32/stm32_ltdc.c: Appease nxstyle

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit efc09bf3e0a87129b77f882976f6217649dea80d
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 24 08:25:05 2020 +0900

    arch/arm/src/stm32/stm32_ltdc.c: Appease nxstyle
    
    The following nxstyle errors are intentionally left.
    They are "Lx" constants shared among multiple files.
    
    arch/arm/src/stm32/stm32_ltdc.c:1774:10: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:1775:10: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:1779:11: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:1780:11: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:1784:11: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:1785:11: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:1804:10: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:1805:10: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:1806:10: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:1845:16: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:1849:17: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:1903:11: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:1903:34: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:1907:12: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:1907:35: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:1987:16: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:1991:17: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:2027:16: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_ltdc.c:2031:17: error: Mixed case identifier found
---
 arch/arm/src/stm32/stm32_ltdc.c | 110 ++++++++++++++++++++++------------------
 1 file changed, 62 insertions(+), 48 deletions(-)

diff --git a/arch/arm/src/stm32/stm32_ltdc.c b/arch/arm/src/stm32/stm32_ltdc.c
index c2f4e92..4ca91ce 100644
--- a/arch/arm/src/stm32/stm32_ltdc.c
+++ b/arch/arm/src/stm32/stm32_ltdc.c
@@ -277,8 +277,8 @@
 /* Preallocated LTDC framebuffers */
 
 /* Position the framebuffer memory in the center of the memory set aside.  We
- * will use any skirts before or after the framebuffer memory as a guard against
- * wild framebuffer writes.
+ * will use any skirts before or after the framebuffer memory as a guard
+ * against wild framebuffer writes.
  */
 
 #define STM32_LTDC_BUFFER_SIZE      CONFIG_STM32_LTDC_FB_SIZE
@@ -343,7 +343,6 @@
 #    error "DMA2D pixel format not supported"
 #  endif
 
-
 #  ifdef CONFIG_STM32_DMA2D_LAYER_SHARED
 #    define STM32_DMA2D_FBSIZE      CONFIG_STM32_DMA2D_FB_SIZE
 #    define STM32_DMA2D_LAYER_SIZE  0
@@ -699,7 +698,8 @@ static void stm32_ltdc_lframebuffer(FAR struct stm32_ltdc_s *layer);
 static void stm32_ltdc_lenable(FAR struct stm32_ltdc_s *layer, bool enable);
 static void stm32_ltdc_ldefaultcolor(FAR struct stm32_ltdc_s * layer,
                                      uint32_t rgb);
-static void stm32_ltdc_ltransp(FAR struct stm32_ltdc_s *layer, uint8_t transp,
+static void stm32_ltdc_ltransp(FAR struct stm32_ltdc_s *layer,
+                               uint8_t transp,
                                uint32_t mode);
 static void stm32_ltdc_lchromakey(FAR struct stm32_ltdc_s *layer,
                                   uint32_t chromakey);
@@ -771,8 +771,8 @@ static int stm32_setblank(FAR struct fb_vtable_s *vtable,
 static int stm32_setarea(FAR struct fb_vtable_s *vtable,
                          FAR const struct fb_overlayinfo_s *oinfo);
 
-/* The following is provided only if the video hardware supports blit and blend
- * operation
+/* The following is provided only if the video hardware supports blit and
+ * blend operation
  */
 
 #  ifdef CONFIG_FB_OVERLAY_BLIT
@@ -1734,7 +1734,8 @@ static void stm32_ltdc_lpixelformat(FAR struct stm32_ltdc_s *layer)
 
   /* Configure PFCR register */
 
-  reginfo("set LTDC_L%dPFCR=%08x\n", overlay + 1, stm32_fmt_layer_t[overlay]);
+  reginfo("set LTDC_L%dPFCR=%08x\n", overlay + 1,
+          stm32_fmt_layer_t[overlay]);
   putreg32(stm32_fmt_layer_t[overlay], stm32_pfcr_layer_t[overlay]);
 
   /* Reload shadow register */
@@ -1809,7 +1810,8 @@ static void stm32_ltdc_lframebuffer(FAR struct stm32_ltdc_s *layer)
 
   /* Configure LxCFBLNR register */
 
-  reginfo("set LTDC_L%dCFBLNR=%08x\n", layerno + 1, stm32_height_layer_t[layerno]);
+  reginfo("set LTDC_L%dCFBLNR=%08x\n", layerno + 1,
+          stm32_height_layer_t[layerno]);
   putreg32(stm32_height_layer_t[layerno], stm32_cfblnr_layer_t[layerno]);
 
   /* Reload shadow register */
@@ -1872,7 +1874,8 @@ static void stm32_ltdc_lenable(FAR struct stm32_ltdc_s *layer, bool enable)
  *
  ****************************************************************************/
 
-static void stm32_ltdc_ltransp(FAR struct stm32_ltdc_s *layer, uint8_t transp,
+static void stm32_ltdc_ltransp(FAR struct stm32_ltdc_s *layer,
+                               uint8_t transp,
                                uint32_t mode)
 {
   uint32_t bf1;
@@ -1942,7 +1945,7 @@ static void stm32_ltdc_lchromakey(FAR struct stm32_ltdc_s *layer,
   uint8_t r = g_vtable.cmap.red[chroma];
   uint8_t g = g_vtable.cmap.green[chroma];
   uint8_t b = g_vtable.cmap.blue[chroma];
-  rgb = ((r << 16)|(g << 8)|b);
+  rgb = ((r << 16) | (g << 8) | b);
 #else
   rgb = ARGB8888(chroma);
 #endif
@@ -2009,7 +2012,8 @@ static void stm32_ltdc_lchromakeyenable(FAR struct stm32_ltdc_s *layer,
  ****************************************************************************/
 
 #ifdef CONFIG_STM32_FB_CMAP
-static void stm32_ltdc_lclutenable(FAR struct stm32_ltdc_s *layer, bool enable)
+static void stm32_ltdc_lclutenable(FAR struct stm32_ltdc_s *layer,
+                                   bool enable)
 {
   uint32_t    regval;
 
@@ -2111,7 +2115,6 @@ static void stm32_ltdc_lgetclut(FAR struct stm32_ltdc_s * layer,
 
   for (n = cmap->first; n < cmap->len && n < STM32_LTDC_NCLUT; n++)
     {
-
 #  ifdef CONFIG_STM32_FB_TRANSPARENCY
       cmap->transp[n] = priv_cmap->transp[n];
 #  endif
@@ -2119,7 +2122,8 @@ static void stm32_ltdc_lgetclut(FAR struct stm32_ltdc_s * layer,
       cmap->green[n]  = priv_cmap->green[n];
       cmap->blue[n]   = priv_cmap->blue[n];
 
-      reginfo("color = %d, transp=%02x, red=%02x, green=%02x, blue=%02x\n", n,
+      reginfo("color = %d, transp=%02x, red=%02x, green=%02x, blue=%02x\n",
+              n,
 #  ifdef CONFIG_STM32_FB_TRANSPARENCY
               cmap->transp[n],
 #  endif
@@ -2143,7 +2147,7 @@ static void stm32_ltdc_lgetclut(FAR struct stm32_ltdc_s * layer,
 
 static void stm32_ltdc_lclear(uint8_t overlayno)
 {
-  memset((uint8_t*)stm32_fbmem_layer_t[overlayno], 0,
+  memset((uint8_t *)stm32_fbmem_layer_t[overlayno], 0,
         stm32_fblen_layer_t[overlayno]);
 }
 
@@ -2166,8 +2170,8 @@ static bool stm32_ltdc_lvalidate(FAR const struct stm32_ltdc_s *layer,
 {
   uint32_t offset;
 
-  offset = (area->y + area->h - 1) * layer->oinfo.stride + (area->x + area->w) *
-      layer->oinfo.bpp / 8;
+  offset = (area->y + area->h - 1) * layer->oinfo.stride +
+           (area->x + area->w) * layer->oinfo.bpp / 8;
 
   return (offset <= layer->oinfo.fblen && area->w > 0 && area->h > 0);
 }
@@ -2203,7 +2207,7 @@ static void stm32_ltdc_linit(uint8_t overlay)
 
   stm32_ltdc_lenable(layer, false);
 
-    /* Clear the layer framebuffer */
+  /* Clear the layer framebuffer */
 
   stm32_ltdc_lclear(overlay);
 
@@ -2513,6 +2517,7 @@ static int stm32_putcmap(struct fb_vtable_s *vtable,
           FAR struct stm32_ltdc_s * layer = &priv->layer[n];
           stm32_ltdc_lputclut(layer, priv_cmap);
         }
+
 #  ifdef CONFIG_STM32_DMA2D
       /* Update dma2d cmap */
 
@@ -2527,11 +2532,11 @@ static int stm32_putcmap(struct fb_vtable_s *vtable,
 }
 #endif /* CONFIG_STM32_FB_CMAP */
 
-/***************************************************************************
+/****************************************************************************
  * Name: stm32_ioctl_waitforvsync
  * Description:
  *   Entrypoint ioctl FBIO_WAITFORSYNC
- ***************************************************************************/
+ ****************************************************************************/
 
 #ifdef CONFIG_FB_SYNC
 static int stm32_waitforvsync(FAR struct fb_vtable_s *vtable)
@@ -2548,18 +2553,18 @@ static int stm32_waitforvsync(FAR struct fb_vtable_s *vtable)
 }
 #endif /* CONFIG_FB_SYNC */
 
-/***************************************************************************
+/****************************************************************************
  * Name: stm32_getoverlayinfo
  * Description:
  *   Entrypoint ioctl FBIOGET_OVERLAYINFO
- ***************************************************************************/
+ ****************************************************************************/
 
 #ifdef CONFIG_FB_OVERLAY
 static int stm32_getoverlayinfo(FAR struct fb_vtable_s *vtable,
                                 int overlayno,
                                 FAR struct fb_overlayinfo_s *oinfo)
 {
-  FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s*)vtable;
+  FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s *)vtable;
 
   lcdinfo("vtable=%p overlay=%d oinfo=%p\n", vtable, overlayno, oinfo);
   DEBUGASSERT(vtable != NULL && priv == &g_vtable);
@@ -2575,16 +2580,16 @@ static int stm32_getoverlayinfo(FAR struct fb_vtable_s *vtable,
   return -EINVAL;
 }
 
-/***************************************************************************
+/****************************************************************************
  * Name: stm32_settransp
  * Description:
  *   Entrypoint ioctl FBIOSET_TRANSP
- ***************************************************************************/
+ ****************************************************************************/
 
 static int stm32_settransp(FAR struct fb_vtable_s *vtable,
                            FAR const struct fb_overlayinfo_s *oinfo)
 {
-  FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s*)vtable;
+  FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s *)vtable;
 
   DEBUGASSERT(vtable != NULL && priv == &g_vtable);
   lcdinfo("vtable=%p, overlay=%d, transp=%02x, transp_mode=%02x\n", vtable,
@@ -2631,11 +2636,11 @@ static int stm32_settransp(FAR struct fb_vtable_s *vtable,
   return -EINVAL;
 }
 
-/***************************************************************************
+/****************************************************************************
  * Name: stm32_setchromakey
  * Description:
  *   Entrypoint ioctl FBIOSET_CHROMAKEY
- ***************************************************************************/
+ ****************************************************************************/
 
 static int stm32_setchromakey(FAR struct fb_vtable_s *vtable,
                               FAR const struct fb_overlayinfo_s *oinfo)
@@ -2657,6 +2662,7 @@ static int stm32_setchromakey(FAR struct fb_vtable_s *vtable,
           return -ENOSYS;
         }
 #  endif
+
 #  ifndef CONFIG_STM32_LTDC_L2_CHROMAKEY
       if (oinfo->overlay == LTDC_LAYER_L2)
         {
@@ -2698,11 +2704,11 @@ static int stm32_setchromakey(FAR struct fb_vtable_s *vtable,
   return -EINVAL;
 }
 
-/***************************************************************************
+/****************************************************************************
  * Name: stm32_setcolor
  * Description:
  *   Entrypoint ioctl FBIOSET_COLOR
- ***************************************************************************/
+ ****************************************************************************/
 
 static int stm32_setcolor(FAR struct fb_vtable_s *vtable,
                           FAR const struct fb_overlayinfo_s *oinfo)
@@ -2719,7 +2725,8 @@ static int stm32_setcolor(FAR struct fb_vtable_s *vtable,
        */
 
       int ret;
-      FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s*)vtable;
+      FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s *)
+                                         vtable;
       FAR struct stm32_ltdc_s * layer = &priv->layer[oinfo->overlay];
       FAR struct fb_overlayinfo_s * poverlay = layer->dma2dinfo.oinfo;
 
@@ -2743,16 +2750,16 @@ static int stm32_setcolor(FAR struct fb_vtable_s *vtable,
   return -EINVAL;
 }
 
-/***************************************************************************
+/****************************************************************************
  * Name: stm32_setblank
  * Description:
  *   Entrypoint ioctl FBIOSET_BLANK
- ***************************************************************************/
+ ****************************************************************************/
 
 static int stm32_setblank(FAR struct fb_vtable_s *vtable,
                           FAR const struct fb_overlayinfo_s *oinfo)
 {
-  FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s*)vtable;
+  FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s *)vtable;
 
   DEBUGASSERT(vtable != NULL && priv == &g_vtable && oinfo != NULL);
   lcdinfo("vtable=%p, overlay=%d, blank=%02x\n", vtable, oinfo->blank);
@@ -2784,11 +2791,11 @@ static int stm32_setblank(FAR struct fb_vtable_s *vtable,
   return -EINVAL;
 }
 
-/***************************************************************************
+/****************************************************************************
  * Name: stm32_setarea
  * Description:
  *   Entrypoint ioctl FBIOSET_AREA
- ***************************************************************************/
+ ****************************************************************************/
 
 static int stm32_setarea(FAR struct fb_vtable_s *vtable,
                          FAR const struct fb_overlayinfo_s *oinfo)
@@ -2804,10 +2811,12 @@ static int stm32_setarea(FAR struct fb_vtable_s *vtable,
 
       return -ENOSYS;
     }
+
 #  ifdef CONFIG_STM32_DMA2D
   if (oinfo->overlay < LTDC_NOVERLAYS)
     {
-      FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s*)vtable;
+      FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s *)
+                                         vtable;
       FAR struct stm32_ltdc_s * layer  = &priv->layer[oinfo->overlay];
 
       nxsem_wait(layer->lock);
@@ -2822,11 +2831,11 @@ static int stm32_setarea(FAR struct fb_vtable_s *vtable,
   return -EINVAL;
 }
 
-/***************************************************************************
+/****************************************************************************
  * Name: stm32_blit
  * Description:
  *   Entrypoint ioctl FBIOSET_BLIT
- ***************************************************************************/
+ ****************************************************************************/
 
 #  ifdef CONFIG_FB_OVERLAY_BLIT
 static int stm32_blit(FAR struct fb_vtable_s *vtable,
@@ -2835,13 +2844,15 @@ static int stm32_blit(FAR struct fb_vtable_s *vtable,
   DEBUGASSERT(vtable != NULL && vtable == &g_vtable.vtable && blit != NULL);
   lcdinfo("vtable = %p, blit = %p\n", vtable, blit);
 
-  if (blit->dest.overlay < LTDC_NOVERLAYS && blit->src.overlay < LTDC_NOVERLAYS)
+  if (blit->dest.overlay < LTDC_NOVERLAYS &&
+      blit->src.overlay < LTDC_NOVERLAYS)
     {
 #    ifdef CONFIG_STM32_DMA2D
       int ret;
       struct fb_area_s sarea;
       FAR const struct fb_area_s *darea = &blit->dest.area;
-      FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s*)vtable;
+      FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s *)
+                                         vtable;
       FAR struct stm32_ltdc_s *dlayer = &priv->layer[blit->dest.overlay];
       FAR struct stm32_ltdc_s *slayer = &priv->layer[blit->src.overlay];
 
@@ -2857,7 +2868,7 @@ static int stm32_blit(FAR struct fb_vtable_s *vtable,
       if (!stm32_ltdc_lvalidate(dlayer, darea) ||
           !stm32_ltdc_lvalidate(slayer, &sarea))
         {
-            return -EINVAL;
+          return -EINVAL;
         }
 
       sarea.w = MIN(darea->w, sarea.w);
@@ -2880,11 +2891,11 @@ static int stm32_blit(FAR struct fb_vtable_s *vtable,
   return -EINVAL;
 }
 
-/***************************************************************************
+/****************************************************************************
  * Name: stm32_blend
  * Description:
  *   Entrypoint ioctl FBIOSET_BLEND
- ***************************************************************************/
+ ****************************************************************************/
 
 static int stm32_blend(FAR struct fb_vtable_s *vtable,
                        FAR const struct fb_overlayblend_s *blend)
@@ -2901,10 +2912,13 @@ static int stm32_blend(FAR struct fb_vtable_s *vtable,
       struct fb_area_s barea;
       FAR const struct fb_area_s *darea = &blend->dest.area;
       FAR const struct fb_area_s *farea = &blend->foreground.area;
-      FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s*)vtable;
+      FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s *)
+                                         vtable;
       FAR struct stm32_ltdc_s *dlayer = &priv->layer[blend->dest.overlay];
-      FAR struct stm32_ltdc_s *flayer = &priv->layer[blend->foreground.overlay];
-      FAR struct stm32_ltdc_s *blayer = &priv->layer[blend->background.overlay];
+      FAR struct stm32_ltdc_s *flayer =
+                                    &priv->layer[blend->foreground.overlay];
+      FAR struct stm32_ltdc_s *blayer =
+                                    &priv->layer[blend->background.overlay];
 
       DEBUGASSERT(&dlayer->oinfo == dlayer->dma2dinfo.oinfo &&
                   &flayer->oinfo == flayer->dma2dinfo.oinfo &&
@@ -2920,8 +2934,8 @@ static int stm32_blend(FAR struct fb_vtable_s *vtable,
           !stm32_ltdc_lvalidate(flayer, farea) ||
           !stm32_ltdc_lvalidate(blayer, &barea))
         {
-            lcderr("ERROR: Returning EINVAL\n");
-            return -EINVAL;
+          lcderr("ERROR: Returning EINVAL\n");
+          return -EINVAL;
         }
 
       barea.w = MIN(darea->w, barea.w);


[incubator-nuttx] 11/28: graphics/nxterm/nxterm_kbdin.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 78c03c88bdb12792a961b5561a0275b554c533fe
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 24 12:50:41 2020 +0900

    graphics/nxterm/nxterm_kbdin.c: Fix a syslog format
---
 graphics/nxterm/nxterm_kbdin.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/graphics/nxterm/nxterm_kbdin.c b/graphics/nxterm/nxterm_kbdin.c
index 6aabfaa..cdc8a6a 100644
--- a/graphics/nxterm/nxterm_kbdin.c
+++ b/graphics/nxterm/nxterm_kbdin.c
@@ -39,6 +39,7 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
 #include <fcntl.h>
 #include <sched.h>
 #include <assert.h>
@@ -384,7 +385,7 @@ void nxterm_kbdin(NXTERM handle, FAR const uint8_t *buffer, uint8_t buflen)
   char ch;
   int ret;
 
-  ginfo("buflen=%d\n");
+  ginfo("buflen=%" PRId8 "\n", buflen);
   DEBUGASSERT(handle);
 
   /* Get the reference to the driver structure from the handle */


[incubator-nuttx] 27/28: arch/arm/src/stm32f0l0g0/stm32_adc.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit a70961ec9d3454d4877de1b2b56efd9f920a1227
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 13:43:53 2020 +0900

    arch/arm/src/stm32f0l0g0/stm32_adc.c: Fix syslog formats
---
 arch/arm/src/stm32f0l0g0/stm32_adc.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/src/stm32f0l0g0/stm32_adc.c b/arch/arm/src/stm32f0l0g0/stm32_adc.c
index 019fb82..2ebc8dd 100644
--- a/arch/arm/src/stm32f0l0g0/stm32_adc.c
+++ b/arch/arm/src/stm32f0l0g0/stm32_adc.c
@@ -26,6 +26,7 @@
 
 #include <stdio.h>
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <unistd.h>
@@ -1648,17 +1649,19 @@ static void adc_dumpregs(FAR struct stm32_dev_s *priv)
 {
   UNUSED(priv);
 
-  ainfo("ISR:  0x%08x IER:  0x%08x CR:   0x%08x CFGR1: 0x%08x\n",
+  ainfo("ISR:  0x%08" PRIx32 " IER:  0x%08" PRIx32
+        " CR:   0x%08" PRIx32 " CFGR1: 0x%08" PRIx32 "\n",
         adc_getreg(priv, STM32_ADC_ISR_OFFSET),
         adc_getreg(priv, STM32_ADC_IER_OFFSET),
         adc_getreg(priv, STM32_ADC_CR_OFFSET),
         adc_getreg(priv, STM32_ADC_CFGR1_OFFSET));
 
-  ainfo("SMPR: 0x%08x CHSELR: 0x%08x\n",
+  ainfo("SMPR: 0x%08" PRIx32 " CHSELR: 0x%08" PRIx32 "\n",
         adc_getreg(priv, STM32_ADC_SMPR_OFFSET),
         adc_getreg(priv, STM32_ADC_CHSELR_OFFSET));
 
-  ainfo("CCR:  0x%08x\n", adccmn_getreg(priv, STM32_ADC_CCR_OFFSET));
+  ainfo("CCR:  0x%08" PRIx32 "\n",
+        adccmn_getreg(priv, STM32_ADC_CCR_OFFSET));
 }
 
 /****************************************************************************


[incubator-nuttx] 22/28: fs/spiffs/src/spiffs_mtd.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 0dee21503d04a6d9177e046dae1a4827db268efe
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 08:18:40 2020 +0900

    fs/spiffs/src/spiffs_mtd.c: Fix syslog formats
---
 fs/spiffs/src/spiffs_mtd.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/fs/spiffs/src/spiffs_mtd.c b/fs/spiffs/src/spiffs_mtd.c
index ac2846e..dea9ee7 100644
--- a/fs/spiffs/src/spiffs_mtd.c
+++ b/fs/spiffs/src/spiffs_mtd.c
@@ -148,7 +148,7 @@ ssize_t spiffs_mtd_write(FAR struct spiffs_s *fs, off_t offset, size_t len,
           ret = MTD_BREAD(fs->mtd, blkstart, 1, wptr);
           if (ret < 0)
             {
-              ferr("ERROR: MTD_BREAD() failed: %d\n", ret);
+              ferr("ERROR: MTD_BREAD() failed: %zd\n", ret);
               return (ssize_t)ret;
             }
 
@@ -160,8 +160,8 @@ ssize_t spiffs_mtd_write(FAR struct spiffs_s *fs, off_t offset, size_t len,
           nbytes  = MIN(remaining, maxcopy);
 
           spiffs_mtdinfo("Leading partial block: "
-                         "blkstart=%ld blkoffset=%d nbytes=%d\n",
-                         (long)blkstart, blkoffset, nbytes);
+                         "blkstart=%jd blkoffset=%d nbytes=%d\n",
+                         (intmax_t)blkstart, blkoffset, nbytes);
 
           memcpy(&wptr[blkoffset], src, nbytes);
 
@@ -172,7 +172,7 @@ ssize_t spiffs_mtd_write(FAR struct spiffs_s *fs, off_t offset, size_t len,
           ret = MTD_BWRITE(fs->mtd, blkstart, 1, wptr);
           if (ret < 0)
             {
-              ferr("ERROR: MTD_BWRITE() failed: %d\n", ret);
+              ferr("ERROR: MTD_BWRITE() failed: %zd\n", ret);
               return (ssize_t)ret;
             }
 
@@ -205,7 +205,7 @@ ssize_t spiffs_mtd_write(FAR struct spiffs_s *fs, off_t offset, size_t len,
           ret = MTD_BWRITE(fs->mtd, blkstart, nblocks, src);
           if (ret < 0)
             {
-              ferr("ERROR: MTD_BWRITE() failed: %d\n", ret);
+              ferr("ERROR: MTD_BWRITE() failed: %zd\n", ret);
               return (ssize_t)ret;
             }
 
@@ -227,7 +227,7 @@ ssize_t spiffs_mtd_write(FAR struct spiffs_s *fs, off_t offset, size_t len,
           ret = MTD_BREAD(fs->mtd, blkend, 1, fs->mtd_work);
           if (ret < 0)
             {
-              ferr("ERROR: MTD_BREAD() failed: %d\n", ret);
+              ferr("ERROR: MTD_BREAD() failed: %zd\n", ret);
               return (ssize_t)ret;
             }
 
@@ -250,7 +250,7 @@ ssize_t spiffs_mtd_write(FAR struct spiffs_s *fs, off_t offset, size_t len,
           ret = MTD_BWRITE(fs->mtd, blkend, 1, fs->mtd_work);
           if (ret < 0)
             {
-              ferr("ERROR: MTD_BWRITE() failed: %d\n", ret);
+              ferr("ERROR: MTD_BWRITE() failed: %zd\n", ret);
               return (ssize_t)ret;
             }
         }
@@ -336,7 +336,7 @@ ssize_t spiffs_mtd_read(FAR struct spiffs_s *fs, off_t offset, size_t len,
           ret = MTD_BREAD(fs->mtd, blkstart, 1, wptr);
           if (ret < 0)
             {
-              ferr("ERROR: MTD_BREAD() failed: %d\n", ret);
+              ferr("ERROR: MTD_BREAD() failed: %zd\n", ret);
               return (ssize_t)ret;
             }
 
@@ -348,8 +348,8 @@ ssize_t spiffs_mtd_read(FAR struct spiffs_s *fs, off_t offset, size_t len,
           nbytes  = MIN(remaining, maxcopy);
 
           spiffs_mtdinfo("Leading partial block: "
-                         "blkstart=%ld blkoffset=%d nbytes=%d\n",
-                         (long)blkstart, blkoffset, nbytes);
+                         "blkstart=%jd blkoffset=%d nbytes=%zd\n",
+                         (intmax_t)blkstart, blkoffset, nbytes);
 
           memcpy(dest, &wptr[blkoffset], nbytes);
 
@@ -380,7 +380,7 @@ ssize_t spiffs_mtd_read(FAR struct spiffs_s *fs, off_t offset, size_t len,
           ret = MTD_BREAD(fs->mtd, blkstart, nblocks, dest);
           if (ret < 0)
             {
-              ferr("ERROR: MTD_BREAD() failed: %d\n", ret);
+              ferr("ERROR: MTD_BREAD() failed: %zd\n", ret);
               return (ssize_t)ret;
             }
 
@@ -404,7 +404,7 @@ ssize_t spiffs_mtd_read(FAR struct spiffs_s *fs, off_t offset, size_t len,
           ret = MTD_BREAD(fs->mtd, blkend, 1, fs->mtd_work);
           if (ret < 0)
             {
-              ferr("ERROR: MTD_BREAD() failed: %d\n", ret);
+              ferr("ERROR: MTD_BREAD() failed: %zd\n", ret);
               return (ssize_t)ret;
             }
 


[incubator-nuttx] 15/28: fs/cromfs/fs_cromfs.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 4911b1121b4e8419d9e40e5fce74914c859c3d76
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 07:20:32 2020 +0900

    fs/cromfs/fs_cromfs.c: Fix a syslog format
---
 fs/cromfs/fs_cromfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cromfs/fs_cromfs.c b/fs/cromfs/fs_cromfs.c
index 125c9a9..7990a4f 100644
--- a/fs/cromfs/fs_cromfs.c
+++ b/fs/cromfs/fs_cromfs.c
@@ -838,7 +838,7 @@ static ssize_t cromfs_read(FAR struct file *filep, FAR char *buffer,
   unsigned int copysize;
   unsigned int copyoffs;
 
-  finfo("Read %d bytes from offset %d\n", buflen, filep->f_pos);
+  finfo("Read %zu bytes from offset %jd\n", buflen, (intmax_t)filep->f_pos);
   DEBUGASSERT(filep->f_priv != NULL && filep->f_inode != NULL);
 
   /* Get the mountpoint inode reference from the file structure and the


[incubator-nuttx] 10/28: boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit b6217b23b6ff0551040b9b16576d356a2832a010
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 24 09:00:35 2020 +0900

    boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c: Fix syslog formats
---
 boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c b/boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c
index 030fc5e..f56949b 100644
--- a/boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c
+++ b/boards/arm/stm32/stm32f429i-disco/src/stm32_ili93414ws.c
@@ -48,6 +48,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdbool.h>
 #include <errno.h>
 #include <debug.h>
@@ -1074,7 +1075,7 @@ static int stm32_ili93414ws_sendgram(FAR struct ili9341_lcd_s *lcd,
 {
   FAR struct ili93414ws_lcd_s *priv = (FAR struct ili93414ws_lcd_s *)lcd;
 
-  lcdinfo("wd=%p, nwords=%d\n", wd, nwords);
+  lcdinfo("wd=%p, nwords=%" PRId32 "\n", wd, nwords);
 
   /* Set to 16-bit mode transfer mode, spi device is in disabled state */
 
@@ -1109,7 +1110,7 @@ static int stm32_ili93414ws_recvparam(FAR struct ili9341_lcd_s *lcd,
   stm32_ili93414ws_set8bitmode(priv);
 #endif
 
-  lcdinfo("param=%04x\n", param);
+  lcdinfo("param=%p\n", param);
   return stm32_ili93414ws_recvblock(priv, (uint16_t *)param, 1);
 }
 
@@ -1134,7 +1135,7 @@ static int stm32_ili93414ws_recvgram(FAR struct ili9341_lcd_s *lcd,
 {
   FAR struct ili93414ws_lcd_s *priv = (FAR struct ili93414ws_lcd_s *)lcd;
 
-  lcdinfo("wd=%p, nwords=%d\n", wd, nwords);
+  lcdinfo("wd=%p, nwords=%" PRId32 "\n", wd, nwords);
 
   /* Set to 16-bit mode in disabled state */
 


[incubator-nuttx] 14/28: net/ieee802154/ieee802154_sendto.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 298299684e223e2931f82c6809a7e5443c13f64a
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 07:16:52 2020 +0900

    net/ieee802154/ieee802154_sendto.c: Fix a syslog format
---
 net/ieee802154/ieee802154_sendto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ieee802154/ieee802154_sendto.c b/net/ieee802154/ieee802154_sendto.c
index 391e4c6..6b7d788 100644
--- a/net/ieee802154/ieee802154_sendto.c
+++ b/net/ieee802154/ieee802154_sendto.c
@@ -298,7 +298,7 @@ static uint16_t ieee802154_sendto_eventhandler(FAR struct net_driver_s *dev,
   pstate = (FAR struct ieee802154_sendto_s *)pvpriv;
   radio  = (FAR struct radio_driver_s *)dev;
 
-  ninfo("flags: %04x sent: %d\n", flags, pstate->is_sent);
+  ninfo("flags: %04x sent: %zd\n", flags, pstate->is_sent);
 
   if (pstate != NULL && (flags & IEEE802154_POLL) != 0)
     {


[incubator-nuttx] 16/28: net/tcp/tcp_sendfile.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 634713cec4d170ffe7dd49fdd386f1d6e1096126
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 07:40:46 2020 +0900

    net/tcp/tcp_sendfile.c: Fix syslog formats
---
 net/tcp/tcp_sendfile.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/net/tcp/tcp_sendfile.c b/net/tcp/tcp_sendfile.c
index a1676ca..78c61a1 100644
--- a/net/tcp/tcp_sendfile.c
+++ b/net/tcp/tcp_sendfile.c
@@ -46,6 +46,7 @@
 #include <sys/socket.h>
 
 #include <fcntl.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <stdlib.h>
@@ -151,7 +152,7 @@ static uint16_t ack_eventhandler(FAR struct net_driver_s *dev,
        */
 
       pstate->snd_acked = tcp_getsequence(tcp->ackno) - pstate->snd_isn;
-      ninfo("ACK: acked=%d sent=%d flen=%d\n",
+      ninfo("ACK: acked=%d sent=%zd flen=%zu\n",
             pstate->snd_acked, pstate->snd_sent, pstate->snd_flen);
 
       dev->d_sndlen = 0;
@@ -274,7 +275,7 @@ static uint16_t sendfile_eventhandler(FAR struct net_driver_s *dev,
       return flags;
     }
 
-  ninfo("flags: %04x acked: %d sent: %d\n",
+  ninfo("flags: %04x acked: %d sent: %zd\n",
         flags, pstate->snd_acked, pstate->snd_sent);
 
   /* We get here if (1) not all of the data has been ACKed, (2) we have been
@@ -334,15 +335,15 @@ static uint16_t sendfile_eventhandler(FAR struct net_driver_s *dev,
            */
 
           seqno = pstate->snd_sent + pstate->snd_isn;
-          ninfo("SEND: sndseq %08x->%08x len: %d\n",
-                conn->sndseq, seqno, ret);
+          ninfo("SEND: sndseq %08" PRIx32 "->%08" PRIx32 " len: %d\n",
+                tcp_getsequence(conn->sndseq), seqno, ret);
 
           tcp_setsequence(conn->sndseq, seqno);
 
           /* Update the amount of data sent (but not necessarily ACKed) */
 
           pstate->snd_sent += sndlen;
-          ninfo("pid: %d SEND: acked=%d sent=%d flen=%d\n", getpid(),
+          ninfo("pid: %d SEND: acked=%d sent=%zd flen=%zu\n", getpid(),
                 pstate->snd_acked, pstate->snd_sent, pstate->snd_flen);
         }
       else


[incubator-nuttx] 07/28: arch/arm/src/stm32/stm32_dma2d.c: Appease nxstyle

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit d289fd92afcb4531e4ee3d5286d69593fd2e8e67
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 24 08:46:05 2020 +0900

    arch/arm/src/stm32/stm32_dma2d.c: Appease nxstyle
    
    The following errors are intentionally left.
    (Hardware constants like DMA2D_xGPFCCR_CCM.)
    
    arch/arm/src/stm32/stm32_dma2d.c:484:12: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_dma2d.c:692:13: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_dma2d.c:701:18: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_dma2d.c:706:18: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_dma2d.c:711:18: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_dma2d.c:725:14: error: Mixed case identifier found
    arch/arm/src/stm32/stm32_dma2d.c:732:18: error: Mixed case identifier found
---
 arch/arm/src/stm32/stm32_dma2d.c | 67 +++++++++++++++++++++++-----------------
 1 file changed, 38 insertions(+), 29 deletions(-)

diff --git a/arch/arm/src/stm32/stm32_dma2d.c b/arch/arm/src/stm32/stm32_dma2d.c
index 17d15ec..38938da 100644
--- a/arch/arm/src/stm32/stm32_dma2d.c
+++ b/arch/arm/src/stm32/stm32_dma2d.c
@@ -206,11 +206,14 @@ static int stm32_dma2d_start(void);
 #ifdef CONFIG_STM32_FB_CMAP
 static int stm32_dma2d_loadclut(uintptr_t reg);
 #endif
-static uint32_t stm32_dma2d_memaddress(FAR struct stm32_dma2d_overlay_s *oinfo,
-                                       uint32_t xpos, uint32_t ypos);
-static uint32_t stm32_dma2d_lineoffset(FAR struct stm32_dma2d_overlay_s *oinfo,
-                                       FAR const struct fb_area_s *area);
-static void stm32_dma2d_lfifo(FAR struct stm32_dma2d_overlay_s *oinfo, int lid,
+static uint32_t stm32_dma2d_memaddress(
+                                   FAR struct stm32_dma2d_overlay_s *oinfo,
+                                   uint32_t xpos, uint32_t ypos);
+static uint32_t stm32_dma2d_lineoffset(
+                                   FAR struct stm32_dma2d_overlay_s *oinfo,
+                                   FAR const struct fb_area_s *area);
+static void stm32_dma2d_lfifo(FAR struct stm32_dma2d_overlay_s *oinfo,
+                              int lid,
                               uint32_t xpos, uint32_t ypos,
                               FAR const struct fb_area_s *area);
 static void stm32_dma2d_lcolor(int lid, uint32_t argb);
@@ -255,7 +258,7 @@ static uint32_t g_clut[STM32_DMA2D_NCLUT *
 #  else
                       3
 #  endif
-                      / 4 ];
+                      / 4];
 #endif /* CONFIG_STM32_FB_CMAP */
 
 /* The DMA2D semaphore that enforces mutually exclusive access */
@@ -535,8 +538,9 @@ static int stm32_dma2d_start(void)
  *
  ****************************************************************************/
 
-static uint32_t stm32_dma2d_memaddress(FAR struct stm32_dma2d_overlay_s *oinfo,
-                                       uint32_t xpos, uint32_t ypos)
+static uint32_t stm32_dma2d_memaddress(
+                                   FAR struct stm32_dma2d_overlay_s *oinfo,
+                                   uint32_t xpos, uint32_t ypos)
 {
   uint32_t offset;
   FAR struct fb_overlayinfo_s *poverlay = oinfo->oinfo;
@@ -561,8 +565,9 @@ static uint32_t stm32_dma2d_memaddress(FAR struct stm32_dma2d_overlay_s *oinfo,
  *
  ****************************************************************************/
 
-static uint32_t stm32_dma2d_lineoffset(FAR struct stm32_dma2d_overlay_s *oinfo,
-                                       FAR const struct fb_area_s *area)
+static uint32_t stm32_dma2d_lineoffset(
+                                   FAR struct stm32_dma2d_overlay_s *oinfo,
+                                   FAR const struct fb_area_s *area)
 {
   uint32_t loffset;
 
@@ -594,7 +599,8 @@ static void stm32_dma2d_lfifo(FAR struct stm32_dma2d_overlay_s *oinfo,
   lcdinfo("oinfo=%p, lid=%d, xpos=%d, ypos=%d, area=%p\n",
            oinfo, lid, xpos, ypos, area);
 
-  putreg32(stm32_dma2d_memaddress(oinfo, xpos, ypos), stm32_mar_layer_t[lid]);
+  putreg32(stm32_dma2d_memaddress(oinfo, xpos, ypos),
+           stm32_mar_layer_t[lid]);
   putreg32(stm32_dma2d_lineoffset(oinfo, area), stm32_or_layer_t[lid]);
 }
 
@@ -678,8 +684,8 @@ static void stm32_dma2d_lpfc(int lid, uint32_t blendmode, uint8_t alpha,
 {
   uint32_t   pfccrreg;
 
-  lcdinfo("lid=%d, blendmode=%08x, alpha=%02x, fmt=%d\n", lid, blendmode, alpha,
-          fmt);
+  lcdinfo("lid=%d, blendmode=%08x, alpha=%02x, fmt=%d\n",
+          lid, blendmode, alpha, fmt);
 
   /* Set color format */
 
@@ -724,7 +730,6 @@ static void stm32_dma2d_lpfc(int lid, uint32_t blendmode, uint8_t alpha,
       /* Set alpha value */
 
       pfccrreg |= DMA2D_xGPFCCR_ALPHA(alpha);
-
     }
 
   putreg32(pfccrreg, stm32_pfccr_layer_t[lid]);
@@ -807,12 +812,13 @@ static int stm32_dma2d_setclut(FAR const struct fb_cmap_s *cmap)
  * Input Parameters:
  *   oinfo - Overlay to fill
  *   area  - Reference to the valid area structure select the area
- *   argb  - Color to fill the selected area. Color must be argb8888 formatted.
+ *   argb  - Color to fill the selected area. Color must be argb8888
+ *           formatted.
  *
  * Returned Value:
  *    OK        - On success
- *   -EINVAL    - If one of the parameter invalid or if the size of the selected
- *                area outside the visible area of the layer.
+ *   -EINVAL    - If one of the parameter invalid or if the size of the
+ *                selected area outside the visible area of the layer.
  *   -ECANCELED - Operation cancelled, something goes wrong.
  *
  ****************************************************************************/
@@ -890,8 +896,9 @@ static int stm32_dma2d_fillcolor(FAR struct stm32_dma2d_overlay_s *oinfo,
  *
  * Returned Value:
  *    OK        - On success
- *   -EINVAL    - If one of the parameter invalid or if the size of the selected
- *                source area outside the visible area of the destination layer.
+ *   -EINVAL    - If one of the parameter invalid or if the size of the
+ *                selected source area outside the visible area of the
+ *                destination layer.
  *                (The visible area usually represents the display size)
  *   -ECANCELED - Operation cancelled, something goes wrong.
  *
@@ -969,9 +976,9 @@ static int stm32_dma2d_blit(FAR struct stm32_dma2d_overlay_s *doverlay,
  * Description:
  *   Blends the selected area from a background layer with selected position
  *   of the foreground layer. Copies the result to the selected position of
- *   the destination layer. Note! The content of the foreground and background
- *   layer keeps unchanged as long destination layer is unequal to the
- *   foreground and background layer.
+ *   the destination layer. Note! The content of the foreground and
+ *   background layer keeps unchanged as long destination layer is unequal to
+ *   the foreground and background layer.
  *
  * Input Parameters:
  *   doverlay - Destination overlay
@@ -981,13 +988,14 @@ static int stm32_dma2d_blit(FAR struct stm32_dma2d_overlay_s *doverlay,
  *   forexpos - x-Offset foreground overlay
  *   foreypos - y-Offset foreground overlay
  *   boverlay - Background overlay
- *   barea    - x-Offset, y-Offset, x-resolution and y-resolution of background
- *              overlay
+ *   barea    - x-Offset, y-Offset, x-resolution and y-resolution of
+ *              background overlay
  *
  * Returned Value:
  *    OK        - On success
- *   -EINVAL    - If one of the parameter invalid or if the size of the selected
- *                source area outside the visible area of the destination layer.
+ *   -EINVAL    - If one of the parameter invalid or if the size of the
+ *                selected source area outside the visible area of the
+ *                destination layer.
  *                (The visible area usually represents the display size)
  *   -ECANCELED - Operation cancelled, something goes wrong.
  *
@@ -1098,8 +1106,8 @@ int stm32_dma2dinitialize(void)
        * arch/arm/src/stm32/stm32f40xxx_rcc.c
        */
 
-      /* Initialize the DMA2D semaphore that enforces mutually exclusive access
-       * to the driver
+      /* Initialize the DMA2D semaphore that enforces mutually exclusive
+       * access to the driver
        */
 
       nxsem_init(&g_lock, 0, 1);
@@ -1125,7 +1133,8 @@ int stm32_dma2dinitialize(void)
 #endif
 
       stm32_dma2d_control(DMA2D_CR_TCIE | DMA2D_CR_CTCIE | DMA2D_CR_TEIE |
-                          DMA2D_CR_CAEIE | DMA2D_CR_CTCIE | DMA2D_CR_CEIE, 0);
+                          DMA2D_CR_CAEIE | DMA2D_CR_CTCIE | DMA2D_CR_CEIE,
+                          0);
 
       /* Attach DMA2D interrupt vector */
 


[incubator-nuttx] 03/28: arch/avr/src/avr/up_spi.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 4db092b6ac5c2d7e1c5cbe3573636ec75bc741e1
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 24 07:14:33 2020 +0900

    arch/avr/src/avr/up_spi.c: Fix syslog formats
---
 arch/avr/src/avr/up_spi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/avr/src/avr/up_spi.c b/arch/avr/src/avr/up_spi.c
index 7caa2bc..2c45885 100644
--- a/arch/avr/src/avr/up_spi.c
+++ b/arch/avr/src/avr/up_spi.c
@@ -40,6 +40,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <errno.h>
@@ -250,7 +251,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev,
       actual          = priv->actual;
     }
 
-  spiinfo("Frequency %d->%d\n", frequency, actual);
+  spiinfo("Frequency %" PRId32 "->%" PRId32 "\n", frequency, actual);
   return actual;
 }
 


[incubator-nuttx] 04/28: arch/arm/src/stm32/stm32f40xxx_i2c.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 66686ab2942ffeacda898ce008389a2019b98126
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 24 08:17:31 2020 +0900

    arch/arm/src/stm32/stm32f40xxx_i2c.c: Fix syslog formats
---
 arch/arm/src/stm32/stm32f40xxx_i2c.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/arm/src/stm32/stm32f40xxx_i2c.c b/arch/arm/src/stm32/stm32f40xxx_i2c.c
index 38e82fc..0974822 100644
--- a/arch/arm/src/stm32/stm32f40xxx_i2c.c
+++ b/arch/arm/src/stm32/stm32f40xxx_i2c.c
@@ -73,6 +73,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
@@ -788,7 +789,7 @@ static inline void stm32_i2c_sem_waitstop(FAR struct stm32_i2c_priv_s *priv)
    * still pending.
    */
 
-  i2cinfo("Timeout with CR1: %04x SR1: %04x\n", cr1, sr1);
+  i2cinfo("Timeout with CR1: %04" PRIx32 " SR1: %04" PRIx32 "\n", cr1, sr1);
 }
 
 /************************************************************************************
@@ -1364,7 +1365,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
     {
       /* Start bit is set */
 
-      i2cinfo("Entering address handling, status = %i\n", status);
+      i2cinfo("Entering address handling, status = %" PRIi32 "\n", status);
 
       /* Check for empty message (for robustness) */
 
@@ -1451,7 +1452,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
   else if ((status & I2C_SR1_ADDR) == 0 && priv->check_addr_ack)
     {
       i2cinfo("Invalid Address. Setting stop bit and clearing message\n");
-      i2cinfo("status %i\n", status);
+      i2cinfo("status %" PRIi32 "\n", status);
 
       /* Set condition to terminate msg chain transmission as address is invalid. */
 
@@ -1842,7 +1843,8 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
 
       status |= (stm32_i2c_getreg(priv, STM32_I2C_SR2_OFFSET) << 16);
 
-      i2cinfo("Entering read mode dcnt = %i msgc = %i, status 0x%04x\n",
+      i2cinfo("Entering read mode dcnt = %i msgc = %i, "
+              "status 0x%04" PRIx32 "\n",
               priv->dcnt, priv->msgc, status);
 
       /* Byte #N-3W, we don't want to manage RxNE interrupt anymore, bytes
@@ -1941,7 +1943,7 @@ static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv)
         }
 
       i2cinfo(" No correct state detected(start bit, read or write) \n");
-      i2cinfo(" state %i\n", status);
+      i2cinfo(" state %" PRIi32 "\n", status);
 
       /* Set condition to terminate ISR and wake waiting thread */
 
@@ -2338,7 +2340,7 @@ static int stm32_i2c_transfer(FAR struct i2c_master_s *dev,
       status = stm32_i2c_getstatus(priv);
       ret = -ETIMEDOUT;
 
-      i2cerr("ERROR: Timed out: CR1: 0x%04x status: 0x%08x\n",
+      i2cerr("ERROR: Timed out: CR1: 0x%04x status: 0x%08" PRIx32 "\n",
              stm32_i2c_getreg(priv, STM32_I2C_CR1_OFFSET), status);
 
       /* "Note: When the STOP, START or PEC bit is set, the software must


[incubator-nuttx] 13/28: net/ieee802154/ieee802154_sockif.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 7b3cd145de6dc1942d5af4c7ff6fa3dcd457b222
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 07:16:13 2020 +0900

    net/ieee802154/ieee802154_sockif.c: Fix a syslog format
---
 net/ieee802154/ieee802154_sockif.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/ieee802154/ieee802154_sockif.c b/net/ieee802154/ieee802154_sockif.c
index 1ca6f0b..713eae0 100644
--- a/net/ieee802154/ieee802154_sockif.c
+++ b/net/ieee802154/ieee802154_sockif.c
@@ -395,8 +395,9 @@ static int ieee802154_bind(FAR struct socket *psock,
   if (addr->sa_family != AF_IEEE802154 ||
       addrlen < sizeof(struct sockaddr_ieee802154_s))
     {
-      nerr("ERROR: Invalid family: %u or address length: %d < %d\n",
-           addr->sa_family, addrlen, sizeof(struct sockaddr_ieee802154_s));
+      nerr("ERROR: Invalid family: %u or address length: %zu < %zu\n",
+           addr->sa_family, (size_t)addrlen,
+           sizeof(struct sockaddr_ieee802154_s));
       return -EBADF;
     }
 


[incubator-nuttx] 12/28: drivers/sensors/sensor.c: Fix a syslog format

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit f8da954e7c07f0bc4171756bb42140d2854a79b2
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 07:12:02 2020 +0900

    drivers/sensors/sensor.c: Fix a syslog format
---
 drivers/sensors/sensor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/sensors/sensor.c b/drivers/sensors/sensor.c
index 8145b31..0b63713 100644
--- a/drivers/sensors/sensor.c
+++ b/drivers/sensors/sensor.c
@@ -336,7 +336,7 @@ static int sensor_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
   size_t bytes;
   int ret;
 
-  sninfo("cmd=%x arg=%08x\n", cmd, arg);
+  sninfo("cmd=%x arg=%08lx\n", cmd, arg);
 
   ret = nxsem_wait(&upper->exclsem);
   if (ret < 0)


[incubator-nuttx] 18/28: fs/userfs/fs_userfs.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit c0b4076d3b723b848916d52eac88708299ed80cf
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 07:47:34 2020 +0900

    fs/userfs/fs_userfs.c: Fix syslog formats
---
 fs/userfs/fs_userfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/userfs/fs_userfs.c b/fs/userfs/fs_userfs.c
index 46bc0fe..8799272 100644
--- a/fs/userfs/fs_userfs.c
+++ b/fs/userfs/fs_userfs.c
@@ -371,7 +371,7 @@ static ssize_t userfs_read(FAR struct file *filep, char *buffer,
   int respsize;
   int ret;
 
-  finfo("Read %d bytes from offset %d\n", buflen, filep->f_pos);
+  finfo("Read %zu bytes from offset %jd\n", buflen, (intmax_t)filep->f_pos);
 
   DEBUGASSERT(filep != NULL &&
               filep->f_inode != NULL &&
@@ -462,7 +462,7 @@ static ssize_t userfs_write(FAR struct file *filep, FAR const char *buffer,
   ssize_t nrecvd;
   int ret;
 
-  finfo("Write %d bytes to offset %d\n", buflen, filep->f_pos);
+  finfo("Write %zu bytes to offset %jd\n", buflen, (intmax_t)filep->f_pos);
 
   DEBUGASSERT(filep != NULL &&
               filep->f_inode != NULL &&


[incubator-nuttx] 19/28: fs/spiffs/src/spiffs_vfs.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 88bc46f4a6a1888abc1c44e7453265a4f6b19832
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 07:50:35 2020 +0900

    fs/spiffs/src/spiffs_vfs.c: Fix syslog formats
---
 fs/spiffs/src/spiffs_vfs.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/fs/spiffs/src/spiffs_vfs.c b/fs/spiffs/src/spiffs_vfs.c
index 475c9c9..a56e933 100644
--- a/fs/spiffs/src/spiffs_vfs.c
+++ b/fs/spiffs/src/spiffs_vfs.c
@@ -648,8 +648,8 @@ static ssize_t spiffs_write(FAR struct file *filep, FAR const char *buffer,
   off_t offset;
   int ret;
 
-  finfo("filep=%p buffer=%p buflen=%lu\n",
-        filep, buffer, (unsigned long)buflen);
+  finfo("filep=%p buffer=%p buflen=%zu\n",
+        filep, buffer, buflen);
   DEBUGASSERT(filep->f_priv != NULL && filep->f_inode != NULL);
 
   /* Get the mountpoint inode reference from the file structure and the
@@ -765,9 +765,10 @@ static ssize_t spiffs_write(FAR struct file *filep, FAR const char *buffer,
               offset_in_cpage = offset - fobj->cache_page->offset;
 
               spiffs_cacheinfo("Storing to cache page %d for fobj %d "
-                               "offset=%d:%d buflen=%d\n",
-                               fobj->cache_page->cpndx, fobj->objid, offset,
-                               offset_in_cpage, buflen);
+                               "offset=%jd:%jd buflen=%zu\n",
+                               fobj->cache_page->cpndx, fobj->objid,
+                               (intmax_t)offset,
+                               (intmax_t)offset_in_cpage, buflen);
 
               cache      = spiffs_get_cache(fs);
               cpage_data = spiffs_get_cache_page(fs, cache,


[incubator-nuttx] 06/28: arch/arm/src/stm32/stm32_ltdc.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 4f6c99541bd5496c703dc4e6ee1514675c2dd7d1
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 24 08:31:01 2020 +0900

    arch/arm/src/stm32/stm32_ltdc.c: Fix syslog formats
---
 arch/arm/src/stm32/stm32_ltdc.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/src/stm32/stm32_ltdc.c b/arch/arm/src/stm32/stm32_ltdc.c
index 4ca91ce..983fe3c 100644
--- a/arch/arm/src/stm32/stm32_ltdc.c
+++ b/arch/arm/src/stm32/stm32_ltdc.c
@@ -43,6 +43,7 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <string.h>
 #include <errno.h>
@@ -2648,7 +2649,7 @@ static int stm32_setchromakey(FAR struct fb_vtable_s *vtable,
   FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s *)vtable;
 
   DEBUGASSERT(vtable != NULL && priv == &g_vtable && oinfo != NULL);
-  lcdinfo("vtable=%p, overlay=%d, chromakey=%08x\n", vtable,
+  lcdinfo("vtable=%p, overlay=%d, chromakey=%08" PRIx32 "\n", vtable,
           oinfo->overlay, oinfo->chromakey);
 
   if (oinfo->overlay < LTDC_NLAYERS)
@@ -2674,7 +2675,8 @@ static int stm32_setchromakey(FAR struct fb_vtable_s *vtable,
 #  ifdef CONFIG_STM32_FB_CMAP
       if (oinfo->chromakey >= g_vtable.cmap.len)
         {
-          lcderr("ERROR: Clut index %d is out of range\n", oinfo->chromakey);
+          lcderr("ERROR: Clut index %" PRId32 " is out of range\n",
+                 oinfo->chromakey);
           ret = -EINVAL;
         }
       else
@@ -2714,7 +2716,8 @@ static int stm32_setcolor(FAR struct fb_vtable_s *vtable,
                           FAR const struct fb_overlayinfo_s *oinfo)
 {
   DEBUGASSERT(vtable != NULL && vtable == &g_vtable.vtable && oinfo != NULL);
-  lcdinfo("vtable=%p, overlay=%d, color=%08x\n", vtable, oinfo->color);
+  lcdinfo("vtable=%p, overlay=%d, color=%08" PRIx32 "\n",
+          vtable, oinfo->overlay, oinfo->color);
 
   if (oinfo->overlay < LTDC_NOVERLAYS)
     {
@@ -2762,7 +2765,8 @@ static int stm32_setblank(FAR struct fb_vtable_s *vtable,
   FAR struct stm32_ltdcdev_s *priv = (FAR struct stm32_ltdcdev_s *)vtable;
 
   DEBUGASSERT(vtable != NULL && priv == &g_vtable && oinfo != NULL);
-  lcdinfo("vtable=%p, overlay=%d, blank=%02x\n", vtable, oinfo->blank);
+  lcdinfo("vtable=%p, overlay=%d, blank=%02x\n",
+          vtable, oinfo->overlay, oinfo->blank);
 
   if (oinfo->overlay < LTDC_NLAYERS)
     {


[incubator-nuttx] 08/28: arch/arm/src/stm32/stm32_dma2d.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 7b31315879bab37d62287f0015fbf5b09972de97
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Nov 24 08:52:14 2020 +0900

    arch/arm/src/stm32/stm32_dma2d.c: Fix syslog formats
---
 arch/arm/src/stm32/stm32_dma2d.c | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/arch/arm/src/stm32/stm32_dma2d.c b/arch/arm/src/stm32/stm32_dma2d.c
index 38938da..af32462 100644
--- a/arch/arm/src/stm32/stm32_dma2d.c
+++ b/arch/arm/src/stm32/stm32_dma2d.c
@@ -42,6 +42,7 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <string.h>
 #include <errno.h>
@@ -319,13 +320,14 @@ static void stm32_dma2d_control(uint32_t setbits, uint32_t clrbits)
 {
   uint32_t   cr;
 
-  lcdinfo("setbits=%08x, clrbits=%08x\n", setbits, clrbits);
+  lcdinfo("setbits=%08" PRIx32 ", clrbits=%08" PRIx32 "\n",
+          setbits, clrbits);
 
   cr = getreg32(STM32_DMA2D_CR);
   cr &= ~clrbits;
   cr |= setbits;
 
-  lcdinfo("cr=%08x\n", cr);
+  lcdinfo("cr=%08" PRIx32 "\n", cr);
   putreg32(cr, STM32_DMA2D_CR);
 }
 
@@ -547,7 +549,8 @@ static uint32_t stm32_dma2d_memaddress(
 
   offset = xpos * DMA2D_PF_BYPP(poverlay->bpp) + poverlay->stride * ypos;
 
-  lcdinfo("%p, offset=%d\n", ((uint32_t) poverlay->fbmem) + offset, offset);
+  lcdinfo("%" PRIx32 ", offset=%" PRId32 "\n",
+          ((uint32_t) poverlay->fbmem) + offset, offset);
   return ((uint32_t) poverlay->fbmem) + offset;
 }
 
@@ -575,7 +578,7 @@ static uint32_t stm32_dma2d_lineoffset(
 
   loffset = oinfo->xres - area->w;
 
-  lcdinfo("%d\n", loffset);
+  lcdinfo("%" PRId32 "\n", loffset);
   return loffset;
 }
 
@@ -596,7 +599,7 @@ static void stm32_dma2d_lfifo(FAR struct stm32_dma2d_overlay_s *oinfo,
                               int lid, uint32_t xpos, uint32_t ypos,
                               FAR const struct fb_area_s *area)
 {
-  lcdinfo("oinfo=%p, lid=%d, xpos=%d, ypos=%d, area=%p\n",
+  lcdinfo("oinfo=%p, lid=%d, xpos=%" PRId32 ", ypos=%" PRId32 ", area=%p\n",
            oinfo, lid, xpos, ypos, area);
 
   putreg32(stm32_dma2d_memaddress(oinfo, xpos, ypos),
@@ -618,7 +621,7 @@ static void stm32_dma2d_lfifo(FAR struct stm32_dma2d_overlay_s *oinfo,
 
 static void stm32_dma2d_lcolor(int lid, uint32_t argb)
 {
-  lcdinfo("lid=%d, argb=%08x\n", lid, argb);
+  lcdinfo("lid=%d, argb=%08" PRIx32 "\n", lid, argb);
   putreg32(argb, stm32_color_layer_t[lid]);
 }
 
@@ -684,7 +687,7 @@ static void stm32_dma2d_lpfc(int lid, uint32_t blendmode, uint8_t alpha,
 {
   uint32_t   pfccrreg;
 
-  lcdinfo("lid=%d, blendmode=%08x, alpha=%02x, fmt=%d\n",
+  lcdinfo("lid=%d, blendmode=%08" PRIx32 ", alpha=%02x, fmt=%d\n",
           lid, blendmode, alpha, fmt);
 
   /* Set color format */
@@ -831,7 +834,7 @@ static int stm32_dma2d_fillcolor(FAR struct stm32_dma2d_overlay_s *oinfo,
   FAR struct stm32_dma2d_s * priv = &g_dma2ddev;
   DEBUGASSERT(oinfo != NULL && oinfo->oinfo != NULL && area != NULL);
 
-  lcdinfo("oinfo=%p, argb=%08x\n", oinfo, argb);
+  lcdinfo("oinfo=%p, argb=%08" PRIx32 "\n", oinfo, argb);
 
 #ifdef CONFIG_STM32_FB_CMAP
   if (oinfo->fmt == DMA2D_PF_L8)
@@ -913,7 +916,8 @@ static int stm32_dma2d_blit(FAR struct stm32_dma2d_overlay_s *doverlay,
   uint32_t  mode;
   FAR struct stm32_dma2d_s * priv = &g_dma2ddev;
 
-  lcdinfo("doverlay=%p, destxpos=%d, destypos=%d, soverlay=%p, sarea=%p\n",
+  lcdinfo("doverlay=%p, destxpos=%" PRId32 ", destypos=%" PRId32
+          ", soverlay=%p, sarea=%p\n",
           doverlay, destxpos, destypos, soverlay, sarea);
 
   nxsem_wait(priv->lock);
@@ -1011,8 +1015,8 @@ static int stm32_dma2d_blend(FAR struct stm32_dma2d_overlay_s *doverlay,
   int          ret;
   FAR struct stm32_dma2d_s * priv = &g_dma2ddev;
 
-  lcdinfo("doverlay=%p, destxpos=%d, destypos=%d, "
-          "foverlay=%p, forexpos=%d, foreypos=%d, "
+  lcdinfo("doverlay=%p, destxpos=%" PRId32 ", destypos=%" PRId32 ", "
+          "foverlay=%p, forexpos=%" PRId32 ", foreypos=%" PRId32 ", "
           "boverlay=%p, barea=%p, barea.x=%d, barea.y=%d, barea.w=%d, "
           "barea.h=%d\n", doverlay, destxpos, destypos, foverlay, forexpos,
           foreypos, boverlay, barea, barea->x, barea->y, barea->w, barea->h);