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 13:11:37 UTC

[incubator-nuttx] branch master updated (40ff30e -> 78797dc)

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 40ff30e  boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_ssd1306.c: Fix a syslog format
     new 2e6c1bc  arch/arm/src/efm32/efm32_timer.c: Appease nxstyle
     new e7b185f  arch/arm/src/efm32/efm32_timer.c: Fix a syslog format
     new 510e725  drivers/net/dm90x0.c: Fix a syslog format
     new 197df3e  arch/arm/src/arm/arm_dataabort.c: Fix a syslog format
     new 0f07552  arch/arm/src/arm/arm_prefetchabort.c: Fix a syslog format
     new 59e0cf2  arch/arm/src/arm/arm_syscall.c: Fix a syslog format
     new 9058792  arch/arm/src/arm/arm_undefinedinsn.c: Fix a syslog format
     new 10cb7ac  arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c: Fix syslog formats
     new 1fc51b3  arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c: Fix syslog formats
     new 75484f9  drivers/can/can.c: Fix a syslog format
     new ab7ae96  drivers/mtd/m25px.c: Appease nxstyle
     new 723f590  drivers/mtd/m25px.c: Fix a syslog format
     new 4b740fa  drivers/usbdev/cdcecm.c: Fix an undefined variable in a syslog call
     new aad25bc  drivers/usbdev/cdcecm.c: Fix a syslog format
     new 0845c1f  arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c: Appease nxstyle
     new a0f8c45  arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c: Fix syslog formats
     new f1ffb57  arch/arm/src/lpc17xx_40xx/lpc17_40_sdcard.c: Fix syslog formats
     new 916091c  arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c: Fix an undeclared variable
     new 2351b6f  arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c: Fix syslog formats
     new f7feaa8  arch/arm/src/lpc17xx_40xx/lpc17_40_can.c: Appease nxstyle
     new e378c6c  arch/arm/src/lpc17xx_40xx/lpc17_40_can.c: Fix syslog formats
     new 9125eba  arch/arm/src/armv7-m/arm_ramvec_initialize.c: Fix a syslog format
     new 17654f5  net/tcp/tcp_send_buffered.c: Fix syslog formats
     new 40d4c03  net/tcp/tcp_input.c: Fix syslog formats
     new 390f766  net/tcp/tcp_appsend.c: Appease nxstyle
     new af67199  net/tcp/tcp_appsend.c: Fix syslog formats
     new 0a14627  fs/nfs/rpc_clnt.c: Appease nxstyle
     new bed9c3b  fs/nfs/rpc_clnt.c: Fix a syslog format
     new 73dd8a1  fs/nfs/nfs_util.c: Fix syslog formats
     new e8695d6  fs/nfs/nfs_vfsops.c: Fix syslog formats
     new e58a966  fs/binfs/fs_binfs.c: Fix a syslog format
     new cde04a6  fs/unionfs/fs_unionfs.c: Fix syslog formats
     new b9538bf  binfmt/libnxflat/libnxflat_load.c: Appease nxstyle
     new ca2cc51  binfmt/libnxflat/libnxflat_load.c: Fix syslog formats
     new 78797dc  binfmt/libnxflat/libnxflat_bind.c: Fix syslog formats

The 35 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/arm/arm_dataabort.c              |   2 +-
 arch/arm/src/arm/arm_prefetchabort.c          |   2 +-
 arch/arm/src/arm/arm_syscall.c                |   2 +-
 arch/arm/src/arm/arm_undefinedinsn.c          |   2 +-
 arch/arm/src/armv7-m/arm_ramvec_initialize.c  |   3 +-
 arch/arm/src/efm32/efm32_timer.c              |  66 +++++++-------
 arch/arm/src/lpc17xx_40xx/lpc17_40_can.c      | 101 +++++++++++++--------
 arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c |  25 +++---
 arch/arm/src/lpc17xx_40xx/lpc17_40_sdcard.c   |  29 +++---
 arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c   |   7 +-
 arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c      |  11 +--
 arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c  |  53 +++++++----
 binfmt/libnxflat/libnxflat_bind.c             |  31 ++++---
 binfmt/libnxflat/libnxflat_load.c             |  23 ++---
 drivers/can/can.c                             |   3 +-
 drivers/mtd/m25px.c                           | 125 ++++++++++++++------------
 drivers/net/dm90x0.c                          |   6 +-
 drivers/usbdev/cdcecm.c                       |   8 +-
 fs/binfs/fs_binfs.c                           |   3 +-
 fs/nfs/nfs_util.c                             |   5 +-
 fs/nfs/nfs_vfsops.c                           |  11 ++-
 fs/nfs/rpc_clnt.c                             |  42 +++++----
 fs/unionfs/fs_unionfs.c                       |   4 +-
 net/tcp/tcp_appsend.c                         |  17 ++--
 net/tcp/tcp_input.c                           |   6 +-
 net/tcp/tcp_send_buffered.c                   |  23 +++--
 26 files changed, 359 insertions(+), 251 deletions(-)


[incubator-nuttx] 02/35: arch/arm/src/efm32/efm32_timer.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 e7b185f11cf464065090281d45d6d462c8782bc3
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 14:33:51 2020 +0900

    arch/arm/src/efm32/efm32_timer.c: Fix a syslog format
---
 arch/arm/src/efm32/efm32_timer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/efm32/efm32_timer.c b/arch/arm/src/efm32/efm32_timer.c
index 1bdf8cf..d33f7f0 100644
--- a/arch/arm/src/efm32/efm32_timer.c
+++ b/arch/arm/src/efm32/efm32_timer.c
@@ -229,8 +229,8 @@ int efm32_timer_set_freq(uintptr_t base, uint32_t clk_freq, uint32_t freq)
 
   reload = (clk_freq / prescaler / freq);
 
-  tmrinfo("Source: %4xHz Div: %4x Reload: %4x \n", clk_freq, prescaler,
-          reload);
+  tmrinfo("Source: %4" PRIx32 "Hz Div: %4x Reload: %4x \n",
+          clk_freq, prescaler, reload);
 
   putreg32(reload, base + EFM32_TIMER_TOP_OFFSET);
 


[incubator-nuttx] 15/35: arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.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 0845c1f364fac9f607e5961ee001290f7427291a
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 16:57:44 2020 +0900

    arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c: Appease nxstyle
---
 arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c
index a95287c..19b5023 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c
@@ -1382,11 +1382,15 @@ static inline int lpc17_40_reminted(struct lpc17_40_usbhost_s *priv,
   DEBUGASSERT(curr != NULL);
   if (curr != NULL)
     {
-      /* Clear all current entries in the interrupt table for this direction */
+      /* Clear all current entries in the interrupt table for this
+       * direction
+       */
 
       lpc17_40_setinttab(0, 2, offset);
 
-      /* Remove the ED from the list..  Is this ED the first on in the list? */
+      /* Remove the ED from the list..  Is this ED the first on in the
+       * list?
+       */
 
       if (prev == NULL)
         {
@@ -1723,7 +1727,9 @@ static int lpc17_40_usbinterrupt(int irq, void *context, FAR void *arg)
               uint32_t rhstatus = lpc17_40_getreg(LPC17_40_USBHOST_RHSTATUS);
               uinfo("Connect Status Change, RHSTATUS: %08x\n", rhstatus);
 
-              /* If DRWE is set, Connect Status Change indicates a remote wake-up event */
+              /* If DRWE is set, Connect Status Change indicates a remote
+               * wake-up event
+               */
 
               if (rhstatus & OHCI_RHSTATUS_DRWE)
                 {
@@ -1805,7 +1811,9 @@ static int lpc17_40_usbinterrupt(int irq, void *context, FAR void *arg)
                           priv->rhport.hport.devclass = NULL;
                         }
 
-                      /* Notify any waiters for the Root Hub Status change event */
+                      /* Notify any waiters for the Root Hub Status change
+                       * event
+                       */
 
                       if (priv->pscwait)
                         {
@@ -1901,7 +1909,9 @@ static int lpc17_40_usbinterrupt(int irq, void *context, FAR void *arg)
 #ifdef CONFIG_DEBUG_USB
                   if (xfrinfo->tdstatus != TD_CC_NOERROR)
                     {
-                      /* The transfer failed for some reason... dump some diagnostic info. */
+                      /* The transfer failed for some reason... dump some
+                       * diagnostic info.
+                       */
 
                       uerr("ERROR: ED xfrtype:%d TD CTRL:%08x/CC:%d "
                            "RHPORTST1:%08x\n",
@@ -3500,7 +3510,9 @@ static int lpc17_40_cancel(FAR struct usbhost_driver_s *drvr,
               ctrl  = lpc17_40_getreg(LPC17_40_USBHOST_CTRL);
               lpc17_40_putreg(ctrl & ~OHCI_CTRL_BLE, LPC17_40_USBHOST_CTRL);
 
-              /* Remove the TDs attached to the ED, keeping the ED in the list */
+              /* Remove the TDs attached to the ED, keeping the ED in the
+               * list
+               */
 
               td           = (struct lpc17_40_gtd_s *)
                              (ed->hw.headp & ED_HEADP_ADDR_MASK);


[incubator-nuttx] 23/35: net/tcp/tcp_send_buffered.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 17654f592e480df70e91b175f89265fb18fb34a8
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 19:41:42 2020 +0900

    net/tcp/tcp_send_buffered.c: Fix syslog formats
---
 net/tcp/tcp_send_buffered.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/net/tcp/tcp_send_buffered.c b/net/tcp/tcp_send_buffered.c
index 040ad56..9e5a6ae 100644
--- a/net/tcp/tcp_send_buffered.c
+++ b/net/tcp/tcp_send_buffered.c
@@ -53,6 +53,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <stdio.h>
@@ -400,7 +401,7 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
       /* Get the ACK number from the TCP header */
 
       ackno = tcp_getsequence(tcp->ackno);
-      ninfo("ACK: ackno=%u flags=%04x\n", ackno, flags);
+      ninfo("ACK: ackno=%" PRIu32 " flags=%04x\n", ackno, flags);
 
       /* Look at every write buffer in the unacked_q.  The unacked_q
        * holds write buffers that have been entirely sent, but which
@@ -426,7 +427,8 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
               /* Get the sequence number at the end of the data */
 
               lastseq = TCP_WBSEQNO(wrb) + TCP_WBPKTLEN(wrb);
-              ninfo("ACK: wrb=%p seqno=%u lastseq=%u pktlen=%u ackno=%u\n",
+              ninfo("ACK: wrb=%p seqno=%" PRIu32
+                    " lastseq=%" PRIu32 " pktlen=%u ackno=%" PRIu32 "\n",
                     wrb, TCP_WBSEQNO(wrb), lastseq, TCP_WBPKTLEN(wrb),
                     ackno);
 
@@ -478,8 +480,8 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
 
                   /* Set the new sequence number for what remains */
 
-                  ninfo("ACK: wrb=%p seqno=%u pktlen=%u\n",
-                          wrb, TCP_WBSEQNO(wrb), TCP_WBPKTLEN(wrb));
+                  ninfo("ACK: wrb=%p seqno=%" PRIu32 " pktlen=%u\n",
+                        wrb, TCP_WBSEQNO(wrb), TCP_WBPKTLEN(wrb));
                 }
             }
         }
@@ -504,7 +506,8 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
               nacked = TCP_WBSENT(wrb);
             }
 
-          ninfo("ACK: wrb=%p seqno=%u nacked=%u sent=%u ackno=%u\n",
+          ninfo("ACK: wrb=%p seqno=%" PRIu32
+                " nacked=%" PRIu32 " sent=%u ackno=%" PRIu32 "\n",
                 wrb, TCP_WBSEQNO(wrb), nacked, TCP_WBSENT(wrb), ackno);
 
           /* Trim the ACKed bytes from the beginning of the write buffer. */
@@ -513,7 +516,7 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
           TCP_WBSEQNO(wrb) = ackno;
           TCP_WBSENT(wrb) -= nacked;
 
-          ninfo("ACK: wrb=%p seqno=%u pktlen=%u sent=%u\n",
+          ninfo("ACK: wrb=%p seqno=%" PRIu32 " pktlen=%u sent=%u\n",
                 wrb, TCP_WBSEQNO(wrb), TCP_WBPKTLEN(wrb), TCP_WBSENT(wrb));
         }
     }
@@ -563,7 +566,8 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
             }
 
           TCP_WBSENT(wrb) = 0;
-          ninfo("REXMIT: wrb=%p sent=%u, conn tx_unacked=%d sent=%d\n",
+          ninfo("REXMIT: wrb=%p sent=%u, "
+                "conn tx_unacked=%" PRId32 " sent=%" PRId32 "\n",
                 wrb, TCP_WBSENT(wrb), conn->tx_unacked, conn->sent);
 
           /* Increment the retransmit count on this write buffer. */
@@ -635,7 +639,8 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
             }
 
           TCP_WBSENT(wrb) = 0;
-          ninfo("REXMIT: wrb=%p sent=%u, conn tx_unacked=%d sent=%d\n",
+          ninfo("REXMIT: wrb=%p sent=%u, "
+                "conn tx_unacked=%" PRId32 " sent=%" PRId32 "\n",
                 wrb, TCP_WBSENT(wrb), conn->tx_unacked, conn->sent);
 
           /* Free any write buffers that have exceed the retry count */
@@ -795,7 +800,7 @@ static uint16_t psock_send_eventhandler(FAR struct net_driver_s *dev,
            conn->sndseq_max = predicted_seqno;
         }
 
-      ninfo("SEND: wrb=%p nrtx=%u tx_unacked=%u sent=%u\n",
+      ninfo("SEND: wrb=%p nrtx=%u tx_unacked=%" PRIu32 " sent=%" PRIu32 "\n",
             wrb, TCP_WBNRTX(wrb), conn->tx_unacked, conn->sent);
 
       /* Increment the count of bytes sent from this write buffer */


[incubator-nuttx] 25/35: net/tcp/tcp_appsend.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 390f766b368533798519d949ecd90a1d105e8b19
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 19:45:02 2020 +0900

    net/tcp/tcp_appsend.c: Appease nxstyle
---
 net/tcp/tcp_appsend.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/net/tcp/tcp_appsend.c b/net/tcp/tcp_appsend.c
index b545732..f61da7e 100644
--- a/net/tcp/tcp_appsend.c
+++ b/net/tcp/tcp_appsend.c
@@ -223,10 +223,10 @@ void tcp_appsend(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
       if (dev->d_sndlen > 0)
         {
           /* Remember how much data we send out now so that we know
-           * when everything has been acknowledged.  Just increment the amount
-           * of data sent.  This will be needed in sequence number calculations
-           * and we know that this is not a re-transmission.  Retransmissions
-           * do not go through this path.
+           * when everything has been acknowledged.  Just increment the
+           * amount of data sent.  This will be needed in sequence number
+           * calculations and we know that this is not a re-transmission.
+           * Retransmissions do not go through this path.
            */
 
           conn->tx_unacked += dev->d_sndlen;
@@ -315,7 +315,9 @@ void tcp_rexmit(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
       tcp_send(dev, conn, TCP_ACK | TCP_PSH, dev->d_sndlen + hdrlen);
     }
 
-  /* If there is no data to send, just send out a pure ACK if one is requested`. */
+  /* If there is no data to send, just send out a pure ACK if one is
+   * requested.
+   */
 
   else if ((result & TCP_SNDACK) != 0)
     {


[incubator-nuttx] 06/35: arch/arm/src/arm/arm_syscall.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 59e0cf23fc83b95bcc04719bd88e668e9f9c8a73
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 14:38:52 2020 +0900

    arch/arm/src/arm/arm_syscall.c: Fix a syslog format
---
 arch/arm/src/arm/arm_syscall.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/arm/arm_syscall.c b/arch/arm/src/arm/arm_syscall.c
index 536f7c2..dc4d0d6 100644
--- a/arch/arm/src/arm/arm_syscall.c
+++ b/arch/arm/src/arm/arm_syscall.c
@@ -66,7 +66,7 @@
 
 void arm_syscall(uint32_t *regs)
 {
-  _alert("Syscall from 0x%x\n", regs[REG_PC]);
+  _alert("Syscall from 0x%" PRIx32 "\n", regs[REG_PC]);
   CURRENT_REGS = regs;
   PANIC();
 }


[incubator-nuttx] 04/35: arch/arm/src/arm/arm_dataabort.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 197df3edf8dfd4784a9b8090c3dd114422b47de5
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 14:37:37 2020 +0900

    arch/arm/src/arm/arm_dataabort.c: Fix a syslog format
---
 arch/arm/src/arm/arm_dataabort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/arm/arm_dataabort.c b/arch/arm/src/arm/arm_dataabort.c
index 794b3a4..9bc5862 100644
--- a/arch/arm/src/arm/arm_dataabort.c
+++ b/arch/arm/src/arm/arm_dataabort.c
@@ -158,7 +158,7 @@ void arm_dataabort(uint32_t *regs)
 
   /* Crash -- possibly showing diagnost debug information. */
 
-  _alert("Data abort. PC: %08x\n", regs[REG_PC]);
+  _alert("Data abort. PC: %08" PRIx32 "\n", regs[REG_PC]);
   PANIC();
 }
 


[incubator-nuttx] 03/35: drivers/net/dm90x0.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 510e72567f1c44ef9366ac8c81a9a229d251efc3
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 14:36:28 2020 +0900

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

diff --git a/drivers/net/dm90x0.c b/drivers/net/dm90x0.c
index ac76321..b60b7d5 100644
--- a/drivers/net/dm90x0.c
+++ b/drivers/net/dm90x0.c
@@ -1526,8 +1526,10 @@ static int dm9x_ifup(FAR struct net_driver_s *dev)
   int i;
 
   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));
 
   /* Initialize DM90x0 chip */
 


[incubator-nuttx] 01/35: arch/arm/src/efm32/efm32_timer.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 2e6c1bc8ad5d7353f7b2c4488e036c08203d71af
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 14:32:57 2020 +0900

    arch/arm/src/efm32/efm32_timer.c: Appease nxstyle
---
 arch/arm/src/efm32/efm32_timer.c | 66 +++++++++++++++++++++-------------------
 1 file changed, 35 insertions(+), 31 deletions(-)

diff --git a/arch/arm/src/efm32/efm32_timer.c b/arch/arm/src/efm32/efm32_timer.c
index fd9b81d..1bdf8cf 100644
--- a/arch/arm/src/efm32/efm32_timer.c
+++ b/arch/arm/src/efm32/efm32_timer.c
@@ -92,15 +92,15 @@ void efm32_timer_dumpregs(uintptr_t base, FAR const char *msg)
 
   tmrinfo("%s:\n", msg);
   tmrinfo("  CTRL: %04x STATUS: %04x   IEN: %04x     IF: %04x\n",
-          getreg32(base + EFM32_TIMER_CTRL_OFFSET   ),
-          getreg32(base + EFM32_TIMER_STATUS_OFFSET ),
-          getreg32(base + EFM32_TIMER_IEN_OFFSET    ),
-          getreg32(base + EFM32_TIMER_IF_OFFSET     ));
+          getreg32(base + EFM32_TIMER_CTRL_OFFSET),
+          getreg32(base + EFM32_TIMER_STATUS_OFFSET),
+          getreg32(base + EFM32_TIMER_IEN_OFFSET),
+          getreg32(base + EFM32_TIMER_IF_OFFSET));
   tmrinfo("   TOP: %04x   TOPB: %04x   CNT: %04x  ROUTE: %04x\n",
-          getreg32(base + EFM32_TIMER_TOP_OFFSET    ),
-          getreg32(base + EFM32_TIMER_TOPB_OFFSET   ),
-          getreg32(base + EFM32_TIMER_CNT_OFFSET    ),
-          getreg32(base + EFM32_TIMER_ROUTE_OFFSET  ));
+          getreg32(base + EFM32_TIMER_TOP_OFFSET),
+          getreg32(base + EFM32_TIMER_TOPB_OFFSET),
+          getreg32(base + EFM32_TIMER_CNT_OFFSET),
+          getreg32(base + EFM32_TIMER_ROUTE_OFFSET));
 
   for (i = 0; i < EFM32_TIMER_NCC; i++)
     {
@@ -108,21 +108,21 @@ void efm32_timer_dumpregs(uintptr_t base, FAR const char *msg)
 
       tmrinfo("CC%d => CTRL: %04x    CCV:  %04x  CCVP: %04x CCVB: %04x\n",
               i
-              getreg32(base_cc + EFM32_TIMER_CC_CTRL_OFFSET ),
-              getreg32(base_cc + EFM32_TIMER_CC_CCV_OFFSET  ),
-              getreg32(base_cc + EFM32_TIMER_CC_CCVP_OFFSET ),
-              getreg32(base_cc + EFM32_TIMER_CC_CCVB_OFFSET ));
+              getreg32(base_cc + EFM32_TIMER_CC_CTRL_OFFSET),
+              getreg32(base_cc + EFM32_TIMER_CC_CCV_OFFSET),
+              getreg32(base_cc + EFM32_TIMER_CC_CCVP_OFFSET),
+              getreg32(base_cc + EFM32_TIMER_CC_CCVB_OFFSET));
     }
 
   tmrinfo("DTCTRL: %04x DTTIME: %04x  DTFC: %04x DTOGEN:  %04x\n",
-          getreg32(base + EFM32_TIMER_CTRL_OFFSET   ),
-          getreg32(base + EFM32_TIMER_STATUS_OFFSET ),
-          getreg32(base + EFM32_TIMER_IEN_OFFSET    ),
-          getreg32(base + EFM32_TIMER_IF_OFFSET     ));
+          getreg32(base + EFM32_TIMER_CTRL_OFFSET),
+          getreg32(base + EFM32_TIMER_STATUS_OFFSET),
+          getreg32(base + EFM32_TIMER_IEN_OFFSET),
+          getreg32(base + EFM32_TIMER_IF_OFFSET));
   tmrinfo("DTFAULT: %04x DTFAULTC: %04x  DTLOCK: %04x \n",
-          getreg32(base + EFM32_TIMER_CTRL_OFFSET   ),
-          getreg32(base + EFM32_TIMER_STATUS_OFFSET ),
-          getreg32(base + EFM32_TIMER_IEN_OFFSET    ),
+          getreg32(base + EFM32_TIMER_CTRL_OFFSET),
+          getreg32(base + EFM32_TIMER_STATUS_OFFSET),
+          getreg32(base + EFM32_TIMER_IEN_OFFSET),
 #endif
 }
 
@@ -150,25 +150,28 @@ void efm32_timer_reset(uintptr_t base)
 
   /* Reset timer register */
 
-  putreg32(_TIMER_CTRL_RESETVALUE,  base + EFM32_TIMER_CTRL_OFFSET     );
-  putreg32(_TIMER_IEN_RESETVALUE,   base + EFM32_TIMER_STATUS_OFFSET   );
-  putreg32(_TIMER_IFC_MASK,         base + EFM32_TIMER_IEN_OFFSET      );
-  putreg32(_TIMER_TOP_RESETVALUE,   base + EFM32_TIMER_IF_OFFSET       );
-  putreg32(_TIMER_TOPB_RESETVALUE,  base + EFM32_TIMER_CTRL_OFFSET     );
-  putreg32(_TIMER_CNT_RESETVALUE,   base + EFM32_TIMER_CMD_OFFSET      );
+  putreg32(_TIMER_CTRL_RESETVALUE,  base + EFM32_TIMER_CTRL_OFFSET);
+  putreg32(_TIMER_IEN_RESETVALUE,   base + EFM32_TIMER_STATUS_OFFSET);
+  putreg32(_TIMER_IFC_MASK,         base + EFM32_TIMER_IEN_OFFSET);
+  putreg32(_TIMER_TOP_RESETVALUE,   base + EFM32_TIMER_IF_OFFSET);
+  putreg32(_TIMER_TOPB_RESETVALUE,  base + EFM32_TIMER_CTRL_OFFSET);
+  putreg32(_TIMER_CNT_RESETVALUE,   base + EFM32_TIMER_CMD_OFFSET);
 
   /* Do not reset route register, setting should be done independently
    * (Note: ROUTE register may be locked by DTLOCK register.)
    */
 
-  //putreg32(_TIMER_ROUTE_RESETVALUE, base + EFM32_TIMER_ROUTE_OFFSET    );
+  /* putreg32(_TIMER_ROUTE_RESETVALUE, base + EFM32_TIMER_ROUTE_OFFSET); */
 
   for (i = 0; i < EFM32_TIMER_NCC; i++)
     {
       uintptr_t base_cc = base + EFM32_TIMER_CC_OFFSET(i);
-      putreg32(_TIMER_CC_CTRL_RESETVALUE, base_cc+EFM32_TIMER_CC_CTRL_OFFSET);
-      putreg32(_TIMER_CC_CCV_RESETVALUE,  base_cc+EFM32_TIMER_CC_CCV_OFFSET );
-      putreg32(_TIMER_CC_CCVB_RESETVALUE, base_cc+EFM32_TIMER_CC_CCVB_OFFSET);
+      putreg32(_TIMER_CC_CTRL_RESETVALUE,
+               base_cc + EFM32_TIMER_CC_CTRL_OFFSET);
+      putreg32(_TIMER_CC_CCV_RESETVALUE,
+               base_cc + EFM32_TIMER_CC_CCV_OFFSET);
+      putreg32(_TIMER_CC_CCVB_RESETVALUE,
+               base_cc + EFM32_TIMER_CC_CCVB_OFFSET);
     }
 
   /* Reset dead time insertion module, no effect on timers without DTI */
@@ -181,7 +184,7 @@ void efm32_timer_reset(uintptr_t base)
   putreg32(_TIMER_DTCTRL_RESETVALUE, base + EFM32_TIMER_DTCTRL_OFFSET);
   putreg32(_TIMER_DTTIME_RESETVALUE, base + EFM32_TIMER_DTTIME_OFFSET);
   putreg32(_TIMER_DTFC_RESETVALUE, base + EFM32_TIMER_DTFC_OFFSET);
-  putreg32(_TIMER_DTOGEN_RESETVALUE,base + EFM32_TIMER_DTOGEN_OFFSET);
+  putreg32(_TIMER_DTOGEN_RESETVALUE, base + EFM32_TIMER_DTOGEN_OFFSET);
   putreg32(_TIMER_DTFAULTC_MASK, base + EFM32_TIMER_DTFAULTC_OFFSET);
 #endif
 }
@@ -226,7 +229,8 @@ int efm32_timer_set_freq(uintptr_t base, uint32_t clk_freq, uint32_t freq)
 
   reload = (clk_freq / prescaler / freq);
 
-  tmrinfo("Source: %4xHz Div: %4x Reload: %4x \n", clk_freq, prescaler, reload);
+  tmrinfo("Source: %4xHz Div: %4x Reload: %4x \n", clk_freq, prescaler,
+          reload);
 
   putreg32(reload, base + EFM32_TIMER_TOP_OFFSET);
 


[incubator-nuttx] 16/35: arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.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 a0f8c4557d2364be649d566cea0bfc27344e4c32
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 17:45:45 2020 +0900

    arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c: Fix syslog formats
---
 arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c | 29 ++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c
index 19b5023..5be37cc 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_usbhost.c
@@ -41,6 +41,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <stdlib.h>
@@ -1297,7 +1298,7 @@ static inline int lpc17_40_addinted(struct lpc17_40_usbhost_s *priv,
 
   ed->hw.nexted = head;
   lpc17_40_setinttab((uint32_t)ed, interval, offset);
-  uinfo("head: %08x next: %08x\n", ed, head);
+  uinfo("head: %p next: %08" PRIx32 "\n", ed, head);
 
   /* Re-enabled periodic list processing */
 
@@ -1368,7 +1369,7 @@ static inline int lpc17_40_reminted(struct lpc17_40_usbhost_s *priv,
    */
 
   head = (struct lpc17_40_ed_s *)HCCA->inttbl[offset];
-  uinfo("ed: %08x head: %08x next: %08x offset: %d\n",
+  uinfo("ed: %p head: %p next: %08" PRIx32 " offset: %d\n",
         ed, head, head ? head->hw.nexted : 0, offset);
 
   /* Find the ED to be removed in the ED list */
@@ -1407,7 +1408,7 @@ static inline int lpc17_40_reminted(struct lpc17_40_usbhost_s *priv,
           prev->hw.nexted = ed->hw.nexted;
         }
 
-        uinfo("ed: %08x head: %08x next: %08x\n",
+        uinfo("ed: %p head: %p next: %08" PRIx32 "\n",
               ed, head, head ? head->hw.nexted : 0);
 
       /* Calculate the new minimum interval for this list */
@@ -1710,7 +1711,7 @@ static int lpc17_40_usbinterrupt(int irq, void *context, FAR void *arg)
 
   intst  = lpc17_40_getreg(LPC17_40_USBHOST_INTST);
   regval = lpc17_40_getreg(LPC17_40_USBHOST_INTEN);
-  uinfo("INST: %08x INTEN: %08x\n", intst, regval);
+  uinfo("INST: %08" PRIx32 " INTEN: %08" PRIx32 "\n", intst, regval);
 
   pending = intst & regval;
   if (pending != 0)
@@ -1720,12 +1721,14 @@ static int lpc17_40_usbinterrupt(int irq, void *context, FAR void *arg)
       if ((pending & OHCI_INT_RHSC) != 0)
         {
           uint32_t rhportst1 = lpc17_40_getreg(LPC17_40_USBHOST_RHPORTST1);
-          uinfo("Root Hub Status Change, RHPORTST1: %08x\n", rhportst1);
+          uinfo("Root Hub Status Change, RHPORTST1: %08" PRIx32 "\n",
+                rhportst1);
 
           if ((rhportst1 & OHCI_RHPORTST_CSC) != 0)
             {
               uint32_t rhstatus = lpc17_40_getreg(LPC17_40_USBHOST_RHSTATUS);
-              uinfo("Connect Status Change, RHSTATUS: %08x\n", rhstatus);
+              uinfo("Connect Status Change, RHSTATUS: %08" PRIx32 "\n",
+                    rhstatus);
 
               /* If DRWE is set, Connect Status Change indicates a remote
                * wake-up event
@@ -2254,7 +2257,7 @@ static int lpc17_40_ep0configure(struct usbhost_driver_s *drvr,
 
   lpc17_40_givesem(&priv->exclsem);
 
-  uinfo("EP0 CTRL:%08x\n", ed->hw.ctrl);
+  uinfo("EP0 CTRL:%08" PRIx32 "\n", ed->hw.ctrl);
   return OK;
 }
 
@@ -2362,7 +2365,7 @@ static int lpc17_40_epalloc(struct usbhost_driver_s *drvr,
         }
 #endif
 
-      uinfo("EP%d CTRL:%08x\n", epdesc->addr, ed->hw.ctrl);
+      uinfo("EP%d CTRL:%08" PRIx32 "\n", epdesc->addr, ed->hw.ctrl);
 
       /* Initialize the semaphore that is used to wait for the endpoint
        * WDH event. The wdhsem semaphore is used for signaling and, hence,
@@ -2854,12 +2857,14 @@ static int lpc17_40_transfer_common(struct lpc17_40_usbhost_s *priv,
   xfrinfo = ed->xfrinfo;
   in      = (ed->hw.ctrl & ED_CONTROL_D_MASK) == ED_CONTROL_D_IN;
 
-  uinfo("EP%u %s toggle:%u maxpacket:%u buflen:%lu\n",
-        (ed->hw.ctrl  & ED_CONTROL_EN_MASK) >> ED_CONTROL_EN_SHIFT,
+  uinfo("EP%" PRIu32 " %s toggle:%u maxpacket:%" PRIu32 " buflen:%zu\n",
+        (uint32_t)((ed->hw.ctrl  & ED_CONTROL_EN_MASK) >>
+                   ED_CONTROL_EN_SHIFT),
         in ? "IN" : "OUT",
         (ed->hw.headp & ED_HEADP_C) != 0 ? 1 : 0,
-        (ed->hw.ctrl  & ED_CONTROL_MPS_MASK) >> ED_CONTROL_MPS_SHIFT,
-        (unsigned long)buflen);
+        (uint32_t)((ed->hw.ctrl  & ED_CONTROL_MPS_MASK) >>
+                   ED_CONTROL_MPS_SHIFT),
+        buflen);
 
   /* Get the direction of the endpoint */
 


[incubator-nuttx] 33/35: binfmt/libnxflat/libnxflat_load.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 b9538bf8853b394d37643a1490bf35b6e979f673
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 20:14:21 2020 +0900

    binfmt/libnxflat/libnxflat_load.c: Appease nxstyle
---
 binfmt/libnxflat/libnxflat_load.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/binfmt/libnxflat/libnxflat_load.c b/binfmt/libnxflat/libnxflat_load.c
index 30c63af..26d8235 100644
--- a/binfmt/libnxflat/libnxflat_load.c
+++ b/binfmt/libnxflat/libnxflat_load.c
@@ -100,9 +100,9 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo)
 
   /* Calculate the extra space we need to allocate.  This extra space will be
    * the size of the BSS section.  This extra space will also be used
-   * temporarily to hold relocation information.  So the allocated size of this
-   * region will either be the size of .data + size of.bss section OR, the
-   * size of .data + the relocation entries, whichever is larger
+   * temporarily to hold relocation information.  So the allocated size of
+   * this region will either be the size of .data + size of.bss section OR,
+   * the size of .data + the relocation entries, whichever is larger
    *
    * This is the amount of memory that we have to have to hold the
    * relocations.
@@ -142,19 +142,21 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo)
    */
 
   /* The following call will give as a pointer to the mapped file ISpace.
-   * This may be in ROM, RAM, Flash, ... We don't really care where the memory
-   * resides as long as it is fully initialized and ready to execute.
+   * This may be in ROM, RAM, Flash, ... We don't really care where the
+   * memory resides as long as it is fully initialized and ready to execute.
    */
 
   loadinfo->ispace = (uint32_t)mmap(NULL, loadinfo->isize, PROT_READ,
-                                    MAP_SHARED | MAP_FILE, loadinfo->filfd, 0);
+                                    MAP_SHARED | MAP_FILE, loadinfo->filfd,
+                                    0);
   if (loadinfo->ispace == (uint32_t)MAP_FAILED)
     {
       berr("Failed to map NXFLAT ISpace: %d\n", errno);
       return -errno;
     }
 
-  binfo("Mapped ISpace (%d bytes) at %08x\n", loadinfo->isize, loadinfo->ispace);
+  binfo("Mapped ISpace (%d bytes) at %08x\n",
+        loadinfo->isize, loadinfo->ispace);
 
   /* The following call allocate D-Space memory and will provide a pointer
    * to the allocated (but still uninitialized) D-Space memory.


[incubator-nuttx] 22/35: arch/arm/src/armv7-m/arm_ramvec_initialize.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 9125ebae376733fd9258c5d2b547ea159125fc9a
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 19:34:57 2020 +0900

    arch/arm/src/armv7-m/arm_ramvec_initialize.c: Fix a syslog format
---
 arch/arm/src/armv7-m/arm_ramvec_initialize.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/src/armv7-m/arm_ramvec_initialize.c b/arch/arm/src/armv7-m/arm_ramvec_initialize.c
index 592732b..3a78adc 100644
--- a/arch/arm/src/armv7-m/arm_ramvec_initialize.c
+++ b/arch/arm/src/armv7-m/arm_ramvec_initialize.c
@@ -25,6 +25,7 @@
 #include <nuttx/config.h>
 
 #include <debug.h>
+#include <inttypes.h>
 
 #include <nuttx/arch.h>
 #include <nuttx/irq.h>
@@ -147,7 +148,7 @@ void arm_ramvec_initialize(void)
    * the table alignment is insufficient.
    */
 
-  irqinfo("NVIC_VECTAB=%08x\n", getreg32(NVIC_VECTAB));
+  irqinfo("NVIC_VECTAB=%08" PRIx32 "\n", getreg32(NVIC_VECTAB));
   DEBUGASSERT(getreg32(NVIC_VECTAB) == (uint32_t)g_ram_vectors);
 }
 


[incubator-nuttx] 18/35: arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c: Fix an undeclared variable

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 916091cbf0cbb3c0896e38b4268ecfa1a7f34953
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 19:16:51 2020 +0900

    arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c: Fix an undeclared variable
---
 arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c
index 000ebee..1150a3c 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c
@@ -2231,7 +2231,7 @@ static int lpc17_40_eth_ioctl(struct net_driver_s *dev, int cmd,
 #endif /* ifdef CONFIG_NETDEV_PHY_IOCTL */
 
       default:
-        nerr("ERROR: Unrecognized IOCTL command: %d\n", command);
+        nerr("ERROR: Unrecognized IOCTL command: %d\n", cmd);
         ret = -ENOTTY;  /* Special return value for this case */
         break;
     }


[incubator-nuttx] 12/35: drivers/mtd/m25px.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 723f590345eed03d2d256167b4ea2540fd58b193
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 16:53:41 2020 +0900

    drivers/mtd/m25px.c: Fix a syslog format
---
 drivers/mtd/m25px.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/m25px.c b/drivers/mtd/m25px.c
index a2f96ed..32c96bf 100644
--- a/drivers/mtd/m25px.c
+++ b/drivers/mtd/m25px.c
@@ -42,6 +42,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <stdlib.h>
@@ -1007,7 +1008,8 @@ static int m25p_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
 
               ret = OK;
 
-              finfo("blocksize: %d erasesize: %d neraseblocks: %d\n",
+              finfo("blocksize: %" PRId32 " erasesize: %" PRId32
+                    " neraseblocks: %" PRId32 "\n",
                     geo->blocksize, geo->erasesize, geo->neraseblocks);
             }
         }


[incubator-nuttx] 11/35: drivers/mtd/m25px.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 ab7ae96a1e60d83ef95f32164a1893d9edd31bb3
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 16:52:26 2020 +0900

    drivers/mtd/m25px.c: Appease nxstyle
---
 drivers/mtd/m25px.c | 121 ++++++++++++++++++++++++++++------------------------
 1 file changed, 66 insertions(+), 55 deletions(-)

diff --git a/drivers/mtd/m25px.c b/drivers/mtd/m25px.c
index 42ffeea..a2f96ed 100644
--- a/drivers/mtd/m25px.c
+++ b/drivers/mtd/m25px.c
@@ -58,7 +58,9 @@
 /************************************************************************************
  * Pre-processor Definitions
  ************************************************************************************/
+
 /* Configuration ********************************************************************/
+
 /* Per the data sheet, M25P10 parts can be driven with either SPI mode 0 (CPOL=0 and
  * CPHA=0) or mode 3 (CPOL=1 and CPHA=1). But I have heard that other devices can
  * operated in mode 0 or 1.  So you may need to specify CONFIG_M25P_SPIMODE to
@@ -92,6 +94,7 @@
 #endif
 
 /* M25P Registers *******************************************************************/
+
 /* Identification register values */
 
 #define M25P_MANUFACTURER          CONFIG_M25P_MANUFACTURER
@@ -182,6 +185,7 @@
 #define M25P_MT25Q128_SUBSECT_SHIFT 12    /* Sub-Sector size 1 << 12 = 4,096 */
 
 /* Instructions */
+
 /*      Command        Value      N Description             Addr Dummy Data   */
 #define M25P_WREN      0x06    /* 1 Write Enable              0   0     0     */
 #define M25P_WRDI      0x04    /* 1 Write Disable             0   0     0     */
@@ -255,7 +259,8 @@ static inline void m25p_unlock(FAR struct spi_dev_s *dev);
 static inline int m25p_readid(struct m25p_dev_s *priv);
 static void m25p_waitwritecomplete(struct m25p_dev_s *priv);
 static void m25p_writeenable(struct m25p_dev_s *priv);
-static inline void m25p_sectorerase(struct m25p_dev_s *priv, off_t offset, uint8_t type);
+static inline void m25p_sectorerase(struct m25p_dev_s *priv, off_t offset,
+                                    uint8_t type);
 static inline int  m25p_bulkerase(struct m25p_dev_s *priv);
 static inline void m25p_pagewrite(struct m25p_dev_s *priv, FAR const uint8_t *buffer,
                                   off_t offset);
@@ -364,72 +369,72 @@ static inline int m25p_readid(struct m25p_dev_s *priv)
 
       if (capacity == M25P_M25P1_CAPACITY)
         {
-           /* Save the FLASH geometry */
+          /* Save the FLASH geometry */
 
-           priv->sectorshift    = M25P_M25P1_SECTOR_SHIFT;
-           priv->nsectors       = M25P_M25P1_NSECTORS;
-           priv->pageshift      = M25P_M25P1_PAGE_SHIFT;
-           priv->npages         = M25P_M25P1_NPAGES;
-           return OK;
+          priv->sectorshift    = M25P_M25P1_SECTOR_SHIFT;
+          priv->nsectors       = M25P_M25P1_NSECTORS;
+          priv->pageshift      = M25P_M25P1_PAGE_SHIFT;
+          priv->npages         = M25P_M25P1_NPAGES;
+          return OK;
         }
       else if (capacity == M25P_EN25F80_CAPACITY)
         {
-           /* Save the FLASH geometry */
+          /* Save the FLASH geometry */
 
-           priv->pageshift      = M25P_EN25F80_PAGE_SHIFT;
-           priv->npages         = M25P_EN25F80_NPAGES;
-           priv->sectorshift    = M25P_EN25F80_SECTOR_SHIFT;
-           priv->nsectors       = M25P_EN25F80_NSECTORS;
+          priv->pageshift      = M25P_EN25F80_PAGE_SHIFT;
+          priv->npages         = M25P_EN25F80_NPAGES;
+          priv->sectorshift    = M25P_EN25F80_SECTOR_SHIFT;
+          priv->nsectors       = M25P_EN25F80_NSECTORS;
 #ifdef CONFIG_M25P_SUBSECTOR_ERASE
-           priv->subsectorshift = M25P_EN25F80_SUBSECT_SHIFT;
+          priv->subsectorshift = M25P_EN25F80_SUBSECT_SHIFT;
 #endif
-           return OK;
+          return OK;
         }
       else if (capacity == M25P_M25P16_CAPACITY)
         {
-           /* Save the FLASH geometry */
+          /* Save the FLASH geometry */
 
-           priv->sectorshift    = M25P_M25P16_SECTOR_SHIFT;
-           priv->nsectors       = M25P_M25P16_NSECTORS;
-           priv->pageshift      = M25P_M25P16_PAGE_SHIFT;
-           priv->npages         = M25P_M25P16_NPAGES;
+          priv->sectorshift    = M25P_M25P16_SECTOR_SHIFT;
+          priv->nsectors       = M25P_M25P16_NSECTORS;
+          priv->pageshift      = M25P_M25P16_PAGE_SHIFT;
+          priv->npages         = M25P_M25P16_NPAGES;
 #ifdef CONFIG_M25P_SUBSECTOR_ERASE
-           priv->subsectorshift = M25P_M25PX16_SUBSECT_SHIFT;
+          priv->subsectorshift = M25P_M25PX16_SUBSECT_SHIFT;
 #endif
-           return OK;
+          return OK;
         }
       else if (capacity == M25P_M25P32_CAPACITY)
         {
-           /* Save the FLASH geometry */
+          /* Save the FLASH geometry */
 
-           priv->sectorshift    = M25P_M25P32_SECTOR_SHIFT;
-           priv->nsectors       = M25P_M25P32_NSECTORS;
-           priv->pageshift      = M25P_M25P32_PAGE_SHIFT;
-           priv->npages         = M25P_M25P32_NPAGES;
+          priv->sectorshift    = M25P_M25P32_SECTOR_SHIFT;
+          priv->nsectors       = M25P_M25P32_NSECTORS;
+          priv->pageshift      = M25P_M25P32_PAGE_SHIFT;
+          priv->npages         = M25P_M25P32_NPAGES;
 #ifdef CONFIG_M25P_SUBSECTOR_ERASE
-           priv->subsectorshift = M25P_M25PX32_SUBSECT_SHIFT;
+          priv->subsectorshift = M25P_M25PX32_SUBSECT_SHIFT;
 #endif
-           return OK;
+          return OK;
         }
       else if (capacity == M25P_M25P64_CAPACITY)
         {
-           /* Save the FLASH geometry */
+          /* Save the FLASH geometry */
 
-           priv->sectorshift    = M25P_M25P64_SECTOR_SHIFT;
-           priv->nsectors       = M25P_M25P64_NSECTORS;
-           priv->pageshift      = M25P_M25P64_PAGE_SHIFT;
-           priv->npages         = M25P_M25P64_NPAGES;
-           return OK;
+          priv->sectorshift    = M25P_M25P64_SECTOR_SHIFT;
+          priv->nsectors       = M25P_M25P64_NSECTORS;
+          priv->pageshift      = M25P_M25P64_PAGE_SHIFT;
+          priv->npages         = M25P_M25P64_NPAGES;
+          return OK;
         }
       else if (capacity == M25P_M25P128_CAPACITY)
         {
-           /* Save the FLASH geometry */
+          /* Save the FLASH geometry */
 
-           priv->sectorshift    = M25P_M25P128_SECTOR_SHIFT;
-           priv->nsectors       = M25P_M25P128_NSECTORS;
-           priv->pageshift      = M25P_M25P128_PAGE_SHIFT;
-           priv->npages         = M25P_M25P128_NPAGES;
-           return OK;
+          priv->sectorshift    = M25P_M25P128_SECTOR_SHIFT;
+          priv->nsectors       = M25P_M25P128_NSECTORS;
+          priv->pageshift      = M25P_M25P128_PAGE_SHIFT;
+          priv->npages         = M25P_M25P128_NPAGES;
+          return OK;
         }
     }
   else if (manufacturer == M25P_MANUFACTURER && memory == MT25Q_MEMORY_TYPE)
@@ -441,16 +446,16 @@ static inline int m25p_readid(struct m25p_dev_s *priv)
 #endif
       if (capacity == M25P_MT25Q128_CAPACITY)
         {
-           /* Save the FLASH geometry */
+          /* Save the FLASH geometry */
 
-           priv->sectorshift    = M25P_MT25Q128_SECTOR_SHIFT;
-           priv->nsectors       = M25P_MT25Q128_NSECTORS;
-           priv->pageshift      = M25P_MT25Q128_PAGE_SHIFT;
-           priv->npages         = M25P_MT25Q128_NPAGES;
+          priv->sectorshift    = M25P_MT25Q128_SECTOR_SHIFT;
+          priv->nsectors       = M25P_MT25Q128_NSECTORS;
+          priv->pageshift      = M25P_MT25Q128_PAGE_SHIFT;
+          priv->npages         = M25P_MT25Q128_NPAGES;
 #ifdef CONFIG_M25P_SUBSECTOR_ERASE
-           priv->subsectorshift = M25P_MT25Q128_SUBSECT_SHIFT;
+          priv->subsectorshift = M25P_MT25Q128_SUBSECT_SHIFT;
 #endif
-           return OK;
+          return OK;
         }
     }
 
@@ -780,7 +785,8 @@ static int m25p_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblock
  * Name: m25p_bread
  ************************************************************************************/
 
-static ssize_t m25p_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks,
+static ssize_t m25p_bread(FAR struct mtd_dev_s *dev, off_t startblock,
+                          size_t nblocks,
                           FAR uint8_t *buffer)
 {
   FAR struct m25p_dev_s *priv = (FAR struct m25p_dev_s *)dev;
@@ -788,12 +794,15 @@ static ssize_t m25p_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t nb
 
   finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks);
 
-  /* On this device, we can handle the block read just like the byte-oriented read */
+  /* On this device, we can handle the block read just like the byte-oriented
+   * read
+   */
 
-  nbytes = m25p_read(dev, startblock << priv->pageshift, nblocks << priv->pageshift, buffer);
+  nbytes = m25p_read(dev, startblock << priv->pageshift,
+                     nblocks << priv->pageshift, buffer);
   if (nbytes > 0)
     {
-        return nbytes >> priv->pageshift;
+      return nbytes >> priv->pageshift;
     }
 
   return (int)nbytes;
@@ -803,7 +812,8 @@ static ssize_t m25p_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t nb
  * Name: m25p_bwrite
  ************************************************************************************/
 
-static ssize_t m25p_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks,
+static ssize_t m25p_bwrite(FAR struct mtd_dev_s *dev, off_t startblock,
+                           size_t nblocks,
                            FAR const uint8_t *buffer)
 {
   FAR struct m25p_dev_s *priv = (FAR struct m25p_dev_s *)dev;
@@ -820,7 +830,7 @@ static ssize_t m25p_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t n
       m25p_pagewrite(priv, buffer, startblock);
       buffer += pagesize;
       startblock++;
-   }
+    }
 
   m25p_unlock(priv->dev);
   return nblocks;
@@ -917,7 +927,7 @@ static ssize_t m25p_write(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes
 
       count = nbytes;
       pagesize = (1 << priv->pageshift);
-      bytestowrite = pagesize - (offset & (pagesize-1));
+      bytestowrite = pagesize - (offset & (pagesize - 1));
       m25p_bytewrite(priv, buffer, offset, bytestowrite);
 
       /* Update offset and count */
@@ -967,7 +977,8 @@ static int m25p_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
     {
       case MTDIOC_GEOMETRY:
         {
-          FAR struct mtd_geometry_s *geo = (FAR struct mtd_geometry_s *)((uintptr_t)arg);
+          FAR struct mtd_geometry_s *geo = (FAR struct mtd_geometry_s *)
+                                           ((uintptr_t)arg);
           if (geo)
             {
               /* Populate the geometry structure with information need to know


[incubator-nuttx] 09/35: arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.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 1fc51b3eeb3f58c4c794a2745cdf57fe55a37a74
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 16:46:16 2020 +0900

    arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c: Fix syslog formats
---
 arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c
index 5a080ef..4e030b5 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c
@@ -40,6 +40,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <errno.h>
@@ -463,7 +464,7 @@ static uint32_t ssp_setfrequency(FAR struct spi_dev_s *dev,
   priv->frequency = frequency;
   priv->actual    = actual;
 
-  spiinfo("Frequency %d->%d\n", frequency, actual);
+  spiinfo("Frequency %" PRId32 "->%" PRId32 "\n", frequency, actual);
   return actual;
 }
 
@@ -604,7 +605,7 @@ static uint32_t ssp_send(FAR struct spi_dev_s *dev, uint32_t wd)
   /* Get the value from the RX FIFO and return it */
 
   regval = ssp_getreg(priv, LPC17_40_SSP_DR_OFFSET);
-  spiinfo("%04x->%04x\n", wd, regval);
+  spiinfo("%04" PRId32 "->%04" PRId32 "\n", wd, regval);
   return regval;
 }
 
@@ -739,7 +740,7 @@ static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer,
    * has occurred)
    */
 
-  spiinfo("nwords: %d\n", nwords);
+  spiinfo("nwords: %zd\n", nwords);
   u.pv = buffer;
   while (nwords || rxpending)
     {
@@ -749,7 +750,7 @@ static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer,
        * and (3) there are more bytes to be sent.
        */
 
-      spiinfo("TX: rxpending: %d nwords: %d\n", rxpending, nwords);
+      spiinfo("TX: rxpending: %" PRId32 " nwords: %zd\n", rxpending, nwords);
       while ((ssp_getreg(priv, LPC17_40_SSP_SR_OFFSET) & SSP_SR_TNF) &&
              (rxpending < LPC17_40_SSP_FIFOSZ) && nwords)
         {
@@ -762,7 +763,7 @@ static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer,
        * not empty.
        */
 
-      spiinfo("RX: rxpending: %d\n", rxpending);
+      spiinfo("RX: rxpending: %" PRId32 "\n", rxpending);
       while (ssp_getreg(priv, LPC17_40_SSP_SR_OFFSET) & SSP_SR_RNE)
         {
           data = (uint8_t)ssp_getreg(priv, LPC17_40_SSP_DR_OFFSET);


[incubator-nuttx] 24/35: net/tcp/tcp_input.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 40d4c03a8cee9aef1783a48446fc4af827f3c3a6
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 19:43:29 2020 +0900

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

diff --git a/net/tcp/tcp_input.c b/net/tcp/tcp_input.c
index 0ae1388..990599b 100644
--- a/net/tcp/tcp_input.c
+++ b/net/tcp/tcp_input.c
@@ -509,8 +509,8 @@ found:
           if ((conn->tcpstateflags & TCP_STATE_MASK) == TCP_ESTABLISHED)
             {
               nwarn("WARNING: ackseq > unackseq\n");
-              nwarn("sndseq=%" PRIu32 " tx_unacked=%u "
-                    "unackseq=%" PRIu32 " ackseq=%" PRIu32 "\n",
+              nwarn("sndseq=%" PRIu32 " tx_unacked=%" PRIu32
+                    " unackseq=%" PRIu32 " ackseq=%" PRIu32 "\n",
                     tcp_getsequence(conn->sndseq), conn->tx_unacked,
                     unackseq, ackseq);
 
@@ -524,7 +524,7 @@ found:
        */
 
       ninfo("sndseq: %08" PRIx32 "->%08" PRIx32
-            " unackseq: %08" PRIx32 " new tx_unacked: %d\n",
+            " unackseq: %08" PRIx32 " new tx_unacked: %" PRId32 "\n",
             tcp_getsequence(conn->sndseq), ackseq, unackseq,
             conn->tx_unacked);
       tcp_setsequence(conn->sndseq, ackseq);


[incubator-nuttx] 21/35: arch/arm/src/lpc17xx_40xx/lpc17_40_can.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 e378c6c95b555f3cd086cc2ba37366650aea3217
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 19:30:42 2020 +0900

    arch/arm/src/lpc17xx_40xx/lpc17_40_can.c: Fix syslog formats
---
 arch/arm/src/lpc17xx_40xx/lpc17_40_can.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c
index b3ca337..7d11140 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c
@@ -52,6 +52,7 @@
 
 #include <stdio.h>
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <errno.h>
@@ -753,8 +754,8 @@ static int lpc17can_send(FAR struct can_dev_s *dev,
   irqstate_t flags;
   int ret = OK;
 
-  caninfo("CAN%d ID: %d DLC: %d\n",
-          priv->port, msg->cm_hdr.ch_id, msg->cm_hdr.ch_dlc);
+  caninfo("CAN%d ID: %" PRId32 " DLC: %d\n",
+          priv->port, (uint32_t)msg->cm_hdr.ch_id, msg->cm_hdr.ch_dlc);
 
   if (msg->cm_hdr.ch_rtr)
     {
@@ -884,7 +885,8 @@ static int lpc17can_send(FAR struct can_dev_s *dev,
     }
   else
     {
-      canerr("ERROR: No available transmission buffer, SR: %08x\n", regval);
+      canerr("ERROR: No available transmission buffer, SR: %08" PRIx32 "\n",
+             regval);
       ret = -EBUSY;
     }
 
@@ -966,7 +968,7 @@ static void can_interrupt(FAR struct can_dev_s *dev)
    */
 
   regval = can_getreg(priv, LPC17_40_CAN_ICR_OFFSET);
-  caninfo("CAN%d ICR: %08x\n",  priv->port, regval);
+  caninfo("CAN%d ICR: %08" PRIx32 "\n", priv->port, regval);
 
   /* Check for a receive interrupt */
 
@@ -1152,8 +1154,8 @@ static int can_bittiming(struct up_dev_s *priv)
   uint32_t ts2;
   uint32_t sjw;
 
-  caninfo("CAN%d PCLK: %d baud: %d\n", priv->port,
-          CAN_CLOCK_FREQUENCY(priv->divisor), priv->baud);
+  caninfo("CAN%d PCLK: %" PRId32 " baud: %" PRId32 "\n", priv->port,
+          (uint32_t)CAN_CLOCK_FREQUENCY(priv->divisor), priv->baud);
 
   /* Try to get CAN_BIT_QUANTA quanta in one bit_time.
    *
@@ -1205,7 +1207,9 @@ static int can_bittiming(struct up_dev_s *priv)
 
   sjw = 1;
 
-  caninfo("TS1: %d TS2: %d BRP: %d SJW= %d\n", ts1, ts2, brp, sjw);
+  caninfo("TS1: %" PRId32 " TS2: %" PRId32
+          " BRP: %" PRId32 " SJW= %" PRId32 "\n",
+          ts1, ts2, brp, sjw);
 
   /* Configure bit timing */
 
@@ -1222,7 +1226,7 @@ static int can_bittiming(struct up_dev_s *priv)
   btr |= CAN_BTR_SAM;
 #endif
 
-  caninfo("Setting CANxBTR= 0x%08x\n", btr);
+  caninfo("Setting CANxBTR= 0x%08" PRIx32 "\n", btr);
   can_putreg(priv, LPC17_40_CAN_BTR_OFFSET, btr);        /* Set bit timing */
   return OK;
 }


[incubator-nuttx] 10/35: drivers/can/can.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 75484f95b8534bf37a588b57fd77310d056b3e70
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 16:49:31 2020 +0900

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

diff --git a/drivers/can/can.c b/drivers/can/can.c
index 5f87408..a0d6d3a 100644
--- a/drivers/can/can.c
+++ b/drivers/can/can.c
@@ -44,6 +44,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <unistd.h>
@@ -1237,7 +1238,7 @@ int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr,
   int                      errcode = -ENOMEM;
   int                      i;
 
-  caninfo("ID: %d DLC: %d\n", hdr->ch_id, hdr->ch_dlc);
+  caninfo("ID: %" PRId32 " DLC: %d\n", (uint32_t)hdr->ch_id, hdr->ch_dlc);
 
   /* Check if adding this new message would over-run the drivers ability to
    * enqueue read data.


[incubator-nuttx] 32/35: fs/unionfs/fs_unionfs.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 cde04a6523b4dede7b91d6f2aa06cd1c23a72923
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 20:13:18 2020 +0900

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

diff --git a/fs/unionfs/fs_unionfs.c b/fs/unionfs/fs_unionfs.c
index 8548ece..7ccb354 100644
--- a/fs/unionfs/fs_unionfs.c
+++ b/fs/unionfs/fs_unionfs.c
@@ -1328,7 +1328,7 @@ static int unionfs_fstat(FAR const struct file *filep, FAR struct stat *buf)
   FAR const struct mountpt_operations *ops;
   int ret = -EPERM;
 
-  finfo("filep=%p buf=%p\n");
+  finfo("filep=%p buf=%p\n", filep, buf);
 
   /* Recover the open file data from the struct file instance */
 
@@ -2473,7 +2473,7 @@ static int unionfs_rename(FAR struct inode *mountpt,
   int tmp;
   int ret = -ENOENT;
 
-  finfo("oldrelpath: %s newrelpath\n", oldrelpath, newrelpath);
+  finfo("oldrelpath: %s newrelpath: %s\n", oldrelpath, newrelpath);
 
   /* Recover the union file system data from the struct inode instance */
 


[incubator-nuttx] 29/35: fs/nfs/nfs_util.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 73dd8a1ba209abd597505767a0a95820d26e27d0
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 19:53:58 2020 +0900

    fs/nfs/nfs_util.c: Fix syslog formats
    
    The following nxstyle error is a false positive.
    https://github.com/apache/incubator-nuttx/issues/387
    
    fs/nfs/nfs_util.c:70:39: error: C++ style comment
---
 fs/nfs/nfs_util.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/nfs_util.c b/fs/nfs/nfs_util.c
index c0de0c3..452d36c 100644
--- a/fs/nfs/nfs_util.c
+++ b/fs/nfs/nfs_util.c
@@ -26,6 +26,7 @@
 #include <sys/types.h>
 #include <sys/time.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <stdlib.h>
@@ -85,7 +86,7 @@ static inline int nfs_pathsegment(FAR const char **path, FAR char *buffer,
         }
       else if (nbytes >= NAME_MAX)
         {
-          ferr("ERROR: File name segment is too long: %d\n", *path);
+          ferr("ERROR: File name segment is too long: %d\n", nbytes);
           return -EFBIG;
         }
       else
@@ -236,7 +237,7 @@ int nfs_lookup(FAR struct nfsmount *nmp, FAR const char *filename,
   value = fxdr_unsigned(uint32_t, value);
   if (value > NFSX_V3FHMAX)
     {
-      ferr("ERROR: Bad file handle length: %d\n", value);
+      ferr("ERROR: Bad file handle length: %" PRId32 "\n", value);
       return -EIO;
     }
 


[incubator-nuttx] 13/35: drivers/usbdev/cdcecm.c: Fix an undefined variable in a syslog call

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 4b740fa13a4af42b68732bc08006a012fa783422
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 16:54:36 2020 +0900

    drivers/usbdev/cdcecm.c: Fix an undefined variable in a syslog call
---
 drivers/usbdev/cdcecm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usbdev/cdcecm.c b/drivers/usbdev/cdcecm.c
index c0a289c..a72ef67 100644
--- a/drivers/usbdev/cdcecm.c
+++ b/drivers/usbdev/cdcecm.c
@@ -1076,7 +1076,7 @@ static int cdcecm_ioctl(FAR struct net_driver_s *dev, int cmd,
       /* Add cases here to support the IOCTL commands */
 
       default:
-        nerr("ERROR: Unrecognized IOCTL command: %d\n", command);
+        nerr("ERROR: Unrecognized IOCTL command: %d\n", cmd);
         return -ENOTTY;  /* Special return value for this case */
     }
 


[incubator-nuttx] 05/35: arch/arm/src/arm/arm_prefetchabort.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 0f075525afa2bf1f2c7024991a62908688e51889
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 14:38:06 2020 +0900

    arch/arm/src/arm/arm_prefetchabort.c: Fix a syslog format
---
 arch/arm/src/arm/arm_prefetchabort.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/arm/arm_prefetchabort.c b/arch/arm/src/arm/arm_prefetchabort.c
index a745288..64f1cc0 100644
--- a/arch/arm/src/arm/arm_prefetchabort.c
+++ b/arch/arm/src/arm/arm_prefetchabort.c
@@ -122,7 +122,7 @@ void arm_prefetchabort(uint32_t *regs)
   else
 #endif
     {
-      _alert("Prefetch abort. PC: %08x\n", regs[REG_PC]);
+      _alert("Prefetch abort. PC: %08" PRIx32 "\n", regs[REG_PC]);
       PANIC();
     }
 }


[incubator-nuttx] 28/35: fs/nfs/rpc_clnt.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 bed9c3b83d602823bed411705d8bf5eefffb767b
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 19:50:46 2020 +0900

    fs/nfs/rpc_clnt.c: Fix a syslog format
---
 fs/nfs/rpc_clnt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/nfs/rpc_clnt.c b/fs/nfs/rpc_clnt.c
index 5d7b180..667f276 100644
--- a/fs/nfs/rpc_clnt.c
+++ b/fs/nfs/rpc_clnt.c
@@ -84,6 +84,7 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <errno.h>
+#include <inttypes.h>
 #include <string.h>
 #include <debug.h>
 
@@ -816,7 +817,7 @@ int rpcclnt_request(FAR struct rpcclnt *rpc, int procnum, int prog,
     }
   else
     {
-      ferr("ERROR: Unsupported RPC type: %d\n", tmp);
+      ferr("ERROR: Unsupported RPC type: %" PRId32 "\n", tmp);
       return -EOPNOTSUPP;
     }
 


[incubator-nuttx] 34/35: binfmt/libnxflat/libnxflat_load.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 ca2cc5133dd52cf66760a88f9cde2914907d92fe
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 20:17:19 2020 +0900

    binfmt/libnxflat/libnxflat_load.c: Fix syslog formats
---
 binfmt/libnxflat/libnxflat_load.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/binfmt/libnxflat/libnxflat_load.c b/binfmt/libnxflat/libnxflat_load.c
index 26d8235..bb4c109 100644
--- a/binfmt/libnxflat/libnxflat_load.c
+++ b/binfmt/libnxflat/libnxflat_load.c
@@ -42,6 +42,7 @@
 #include <sys/types.h>
 #include <sys/mman.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdlib.h>
 #include <nxflat.h>
@@ -155,7 +156,7 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo)
       return -errno;
     }
 
-  binfo("Mapped ISpace (%d bytes) at %08x\n",
+  binfo("Mapped ISpace (%" PRId32 " bytes) at %08x\n",
         loadinfo->isize, loadinfo->ispace);
 
   /* The following call allocate D-Space memory and will provide a pointer
@@ -169,7 +170,7 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo)
       return ret;
     }
 
-  binfo("Allocated DSpace (%d bytes) at %p\n",
+  binfo("Allocated DSpace (%" PRId32 " bytes) at %p\n",
         loadinfo->dsize, loadinfo->dspace->region);
 
   /* If CONFIG_ARCH_ADDRENV=y, then the D-Space allocation lies in an address
@@ -199,8 +200,8 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo)
       goto errout;
     }
 
-  binfo("TEXT: %08x Entry point offset: %08x Data offset: %08x\n",
-      loadinfo->ispace, loadinfo->entryoffs, doffset);
+  binfo("TEXT: %08x Entry point offset: %08" PRIx32 " Data offset: %08jx\n",
+        loadinfo->ispace, loadinfo->entryoffs, (intmax_t)doffset);
 
   /* Restore the original address environment */
 


[incubator-nuttx] 19/35: arch/arm/src/lpc17xx_40xx/lpc17_40_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 2351b6f9100d639e2c9ff660a273ebc8cecea52d
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 19:20:26 2020 +0900

    arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c: Fix syslog formats
---
 arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c
index 1150a3c..d949dc1 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c
@@ -41,6 +41,7 @@
 #if defined(CONFIG_NET) && defined(CONFIG_LPC17_40_ETHERNET)
 #include <sys/ioctl.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <time.h>
@@ -901,7 +902,7 @@ static void lpc17_40_rxdone_work(FAR void *arg)
 
       if ((*rxstat & RXSTAT_INFO_ERROR) != 0)
         {
-          nerr("ERROR: considx: %08x prodidx: %08x rxstat: %08x\n",
+          nerr("ERROR: considx: %08x prodidx: %08x rxstat: %08" PRIx32 "\n",
                considx, prodidx, *rxstat);
           NETDEV_RXERRORS(&priv->lp_dev);
         }
@@ -915,14 +916,14 @@ static void lpc17_40_rxdone_work(FAR void *arg)
       if (pktlen > CONFIG_NET_ETH_PKTSIZE + CONFIG_NET_GUARDSIZE)
         {
           nwarn("WARNING: Too big. considx: %08x prodidx: %08x pktlen: %d "
-                "rxstat: %08x\n",
+                "rxstat: %08" PRIx32 "\n",
                 considx, prodidx, pktlen, *rxstat);
           NETDEV_RXERRORS(&priv->lp_dev);
         }
       else if ((*rxstat & RXSTAT_INFO_LASTFLAG) == 0)
         {
           ninfo("Fragment. considx: %08x prodidx: %08x pktlen: %d "
-                "rxstat: %08x\n",
+                "rxstat: %08" PRIx32 "\n",
                 considx, prodidx, pktlen, *rxstat);
           NETDEV_RXFRAGMENTS(&priv->lp_dev);
           fragment = true;
@@ -930,7 +931,7 @@ static void lpc17_40_rxdone_work(FAR void *arg)
       else if (fragment)
         {
           ninfo("Last fragment. considx: %08x prodidx: %08x pktlen: %d "
-                "rxstat: %08x\n",
+                "rxstat: %08" PRIx32 "\n",
                 considx, prodidx, pktlen, *rxstat);
           NETDEV_RXFRAGMENTS(&priv->lp_dev);
           fragment = false;
@@ -1229,13 +1230,13 @@ static int lpc17_40_interrupt(int irq, void *context, FAR void *arg)
         {
           if ((status & ETH_INT_RXOVR) != 0)
             {
-              nerr("ERROR: RX Overrun. status: %08x\n", status);
+              nerr("ERROR: RX Overrun. status: %08" PRIx32 "\n", status);
               NETDEV_RXERRORS(&priv->lp_dev);
             }
 
           if ((status & ETH_INT_TXUNR) != 0)
             {
-              nerr("ERROR: TX Underrun. status: %08x\n", status);
+              nerr("ERROR: TX Underrun. status: %08" PRIx32 "\n", status);
               NETDEV_TXERRORS(&priv->lp_dev);
             }
 
@@ -1258,7 +1259,7 @@ static int lpc17_40_interrupt(int irq, void *context, FAR void *arg)
 
           if ((status & ETH_INT_RXERR) != 0)
             {
-              nerr("ERROR: RX ERROR: status: %08x\n", status);
+              nerr("ERROR: RX ERROR: status: %08" PRIx32 "\n", status);
               NETDEV_RXERRORS(&priv->lp_dev);
             }
 
@@ -1303,7 +1304,7 @@ static int lpc17_40_interrupt(int irq, void *context, FAR void *arg)
 
           if ((status & ETH_INT_TXERR) != 0)
             {
-              nerr("ERROR: TX ERROR: status: %08x\n", status);
+              nerr("ERROR: TX ERROR: status: %08" PRIx32 "\n", status);
               NETDEV_TXERRORS(&priv->lp_dev);
             }
 
@@ -1639,8 +1640,10 @@ static int lpc17_40_ifup(struct net_driver_s *dev)
   int ret;
 
   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));
 
   /* Reset the Ethernet controller (again) */
 


[incubator-nuttx] 27/35: fs/nfs/rpc_clnt.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 0a146273bf13b861722af309b3a4055b66d84f74
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 19:49:19 2020 +0900

    fs/nfs/rpc_clnt.c: Appease nxstyle
    
    The following nxstyle errors are intentionally left
    because they are parts of the copyright notices.
    
    fs/nfs/rpc_clnt.c:46:80: error: Long line found
    fs/nfs/rpc_clnt.c:63:78: error: Long line found
---
 fs/nfs/rpc_clnt.c | 39 +++++++++++++++++++++++++--------------
 1 file changed, 25 insertions(+), 14 deletions(-)

diff --git a/fs/nfs/rpc_clnt.c b/fs/nfs/rpc_clnt.c
index b219732..5d7b180 100644
--- a/fs/nfs/rpc_clnt.c
+++ b/fs/nfs/rpc_clnt.c
@@ -248,7 +248,8 @@ static int rpcclnt_socket(FAR struct rpcclnt *rpc, in_port_t rport)
   do
     {
       *lport = htons(--port);
-      error = psock_bind(&rpc->rc_so, (FAR struct sockaddr *)&laddr, addrlen);
+      error = psock_bind(&rpc->rc_so, (FAR struct sockaddr *)&laddr,
+                         addrlen);
       if (error < 0)
         {
           ferr("ERROR: psock_bind failed: %d\n", error);
@@ -393,6 +394,7 @@ static int rpcclnt_reply(FAR struct rpcclnt *rpc, uint32_t xid,
   int error;
 
 retry:
+
   /* Get the next RPC reply from the socket */
 
   error = rpcclnt_receive(rpc, reply, resplen);
@@ -536,15 +538,18 @@ int rpcclnt_connect(FAR struct rpcclnt *rpc)
   request.sdata.pmap.port = 0;
 
   error = rpcclnt_request(rpc, PMAPPROC_GETPORT, PMAPPROG, PMAPVERS,
-                          (FAR void *)&request.sdata, sizeof(struct call_args_pmap),
-                          (FAR void *)&response.rdata, sizeof(struct rpc_reply_pmap));
+                          (FAR void *)&request.sdata,
+                          sizeof(struct call_args_pmap),
+                          (FAR void *)&response.rdata,
+                          sizeof(struct rpc_reply_pmap));
   if (error != 0)
     {
       ferr("ERROR: rpcclnt_request failed: %d\n", error);
       goto bad;
     }
 
-  error = rpcclnt_socket(rpc, fxdr_unsigned(uint32_t, response.rdata.pmap.port));
+  error = rpcclnt_socket(rpc,
+                         fxdr_unsigned(uint32_t, response.rdata.pmap.port));
   if (error < 0)
     {
       ferr("ERROR: rpcclnt_socket MOUNTD port failed: %d\n", error);
@@ -554,7 +559,8 @@ int rpcclnt_connect(FAR struct rpcclnt *rpc)
   /* Do RPC to mountd. */
 
   strncpy(request.mountd.mount.rpath, rpc->rc_path, 90);
-  request.mountd.mount.len = txdr_unsigned(sizeof(request.mountd.mount.rpath));
+  request.mountd.mount.len =
+    txdr_unsigned(sizeof(request.mountd.mount.rpath));
 
   error = rpcclnt_request(rpc, RPCMNT_MOUNT, RPCPROG_MNT, RPCMNT_VER3,
                           (FAR void *)&request.mountd,
@@ -574,7 +580,8 @@ int rpcclnt_connect(FAR struct rpcclnt *rpc)
       goto bad;
     }
 
-  rpc->rc_fhsize = fxdr_unsigned(uint32_t, response.mdata.mount.fhandle.length);
+  rpc->rc_fhsize = fxdr_unsigned(uint32_t,
+                                 response.mdata.mount.fhandle.length);
   memcpy(&rpc->rc_fh, &response.mdata.mount.fhandle.handle, rpc->rc_fhsize);
 
   /* Do the RPC to get a dynamic bounding with the server using PMAP.
@@ -604,7 +611,8 @@ int rpcclnt_connect(FAR struct rpcclnt *rpc)
       goto bad;
     }
 
-  error = rpcclnt_socket(rpc, fxdr_unsigned(uint32_t, response.rdata.pmap.port));
+  error = rpcclnt_socket(rpc,
+                         fxdr_unsigned(uint32_t, response.rdata.pmap.port));
   if (error < 0)
     {
       ferr("ERROR: rpcclnt_socket NFS port returns %d\n", error);
@@ -668,7 +676,8 @@ void rpcclnt_disconnect(FAR struct rpcclnt *rpc)
       goto bad;
     }
 
-  error = rpcclnt_socket(rpc, fxdr_unsigned(uint32_t, response.rdata.pmap.port));
+  error = rpcclnt_socket(rpc,
+                         fxdr_unsigned(uint32_t, response.rdata.pmap.port));
   if (error < 0)
     {
       ferr("ERROR: rpcclnt_socket failed: %d\n", error);
@@ -678,7 +687,8 @@ void rpcclnt_disconnect(FAR struct rpcclnt *rpc)
   /* Do RPC to umountd. */
 
   strncpy(request.mountd.umount.rpath, rpc->rc_path, 90);
-  request.mountd.umount.len = txdr_unsigned(sizeof(request.mountd.umount.rpath));
+  request.mountd.umount.len =
+    txdr_unsigned(sizeof(request.mountd.umount.rpath));
 
   error = rpcclnt_request(rpc, RPCMNT_UMOUNT, RPCPROG_MNT, RPCMNT_VER3,
                           (FAR void *)&request.mountd,
@@ -700,9 +710,9 @@ bad:
  *
  * Description:
  *   Perform the RPC request.  Logic formats the RPC CALL message and calls
- *   rpcclnt_send to send the RPC CALL message.  It then calls rpcclnt_reply()
- *   to get the response.  It may attempt to re-send the CALL message on
- *   certain errors.
+ *   rpcclnt_send to send the RPC CALL message.  It then calls
+ *   rpcclnt_reply() to get the response.  It may attempt to re-send the
+ *   CALL message on certain errors.
  *
  *   On successful receipt, it verifies the RPC level of the returned values.
  *   (There may still be be NFS layer errors that will be detected by calling
@@ -729,8 +739,8 @@ int rpcclnt_request(FAR struct rpcclnt *rpc, int procnum, int prog,
   rpcclnt_fmtheader((FAR struct rpc_call_header *)request,
                     xid, prog, version, procnum);
 
-  /* Get the full size of the message (the size of variable data plus the size of
-   * the messages header).
+  /* Get the full size of the message (the size of variable data plus the
+   * size of the messages header).
    */
 
   reqlen += sizeof(struct rpc_call_header);
@@ -779,6 +789,7 @@ int rpcclnt_request(FAR struct rpcclnt *rpc, int procnum, int prog,
         {
           break;
         }
+
       rpc_statistics(rpcretries);
     }
 


[incubator-nuttx] 30/35: fs/nfs/nfs_vfsops.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 e8695d61ca0128c5a05c27adcb522f2501946b41
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 20:09:09 2020 +0900

    fs/nfs/nfs_vfsops.c: Fix syslog formats
    
    The following nxstyle errors are not new.
    (macros like SIZEOF_rpc_reply_readdir)
    
    fs/nfs/nfs_vfsops.c:848:12: error: Mixed case identifier found
    fs/nfs/nfs_vfsops.c:1020:16: error: Mixed case identifier found
    fs/nfs/nfs_vfsops.c:1420:13: error: Mixed case identifier found
    fs/nfs/nfs_vfsops.c:1818:11: error: Mixed case identifier found
    fs/nfs/nfs_vfsops.c:1819:11: error: Mixed case identifier found
    fs/nfs/nfs_vfsops.c:1830:8: error: Mixed case identifier found
    fs/nfs/nfs_vfsops.c:1851:42: error: Mixed case identifier found
    fs/nfs/nfs_vfsops.c:2049:54: error: Mixed case identifier found
    fs/nfs/nfs_vfsops.c:2115:58: error: Mixed case identifier found
    fs/nfs/nfs_vfsops.c:2172:54: error: Mixed case identifier found
---
 fs/nfs/nfs_vfsops.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/fs/nfs/nfs_vfsops.c b/fs/nfs/nfs_vfsops.c
index 8996b3f..8571a91 100644
--- a/fs/nfs/nfs_vfsops.c
+++ b/fs/nfs/nfs_vfsops.c
@@ -53,6 +53,7 @@
 #include <sys/statfs.h>
 #include <sys/stat.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <stdlib.h>
@@ -511,7 +512,7 @@ static int nfs_fileopen(FAR struct nfsmount *nmp, FAR struct nfsnode *np,
       tmp = fxdr_unsigned(uint32_t, fattr.fa_mode);
       if ((tmp & (NFSMODE_IWOTH | NFSMODE_IWGRP | NFSMODE_IWUSR)) == 0)
         {
-          ferr("ERROR: File is read-only: %08x\n", tmp);
+          ferr("ERROR: File is read-only: %08" PRIx32 "\n", tmp);
           return -EACCES;
         }
     }
@@ -795,7 +796,8 @@ static ssize_t nfs_read(FAR struct file *filep, FAR char *buffer,
   FAR uint32_t              *ptr;
   int                        ret = 0;
 
-  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);
 
   /* Sanity checks */
 
@@ -969,7 +971,8 @@ static ssize_t nfs_write(FAR struct file *filep, FAR const char *buffer,
   int                    committed = NFSV3WRITE_FILESYNC;
   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);
 
   /* Sanity checks */
 
@@ -1322,7 +1325,7 @@ static int nfs_opendir(FAR struct inode *mountpt, FAR const char *relpath,
   objtype = fxdr_unsigned(uint32_t, obj_attributes.fa_type);
   if (objtype != NFDIR)
     {
-      ferr("ERROR:  Not a directory, type=%d\n", objtype);
+      ferr("ERROR:  Not a directory, type=%" PRId32 "\n", objtype);
       ret = -ENOTDIR;
       goto errout_with_semaphore;
     }


[incubator-nuttx] 14/35: drivers/usbdev/cdcecm.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 aad25bc4c8355dc2449ba9d75b79e148b64043f2
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 16:55:51 2020 +0900

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

diff --git a/drivers/usbdev/cdcecm.c b/drivers/usbdev/cdcecm.c
index a72ef67..eac1c09 100644
--- a/drivers/usbdev/cdcecm.c
+++ b/drivers/usbdev/cdcecm.c
@@ -765,8 +765,10 @@ static int cdcecm_ifup(FAR 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] 35/35: binfmt/libnxflat/libnxflat_bind.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 78797dc1da9ec0fd039e73ad289683ffd3e9c76a
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 20:24:27 2020 +0900

    binfmt/libnxflat/libnxflat_bind.c: Fix syslog formats
---
 binfmt/libnxflat/libnxflat_bind.c | 31 ++++++++++++++++++-------------
 1 file changed, 18 insertions(+), 13 deletions(-)

diff --git a/binfmt/libnxflat/libnxflat_bind.c b/binfmt/libnxflat/libnxflat_bind.c
index fb012d9..ec038bc 100644
--- a/binfmt/libnxflat/libnxflat_bind.c
+++ b/binfmt/libnxflat/libnxflat_bind.c
@@ -25,6 +25,7 @@
 #include <nuttx/config.h>
 #include <nuttx/compiler.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <string.h>
 #include <nxflat.h>
@@ -82,20 +83,22 @@ static inline int nxflat_bindrel32i(FAR struct nxflat_loadinfo_s *loadinfo,
 {
   FAR uint32_t *addr;
 
-  binfo("NXFLAT_RELOC_TYPE_REL32I Offset: %08x I-Space: %p\n",
+  binfo("NXFLAT_RELOC_TYPE_REL32I Offset: %08" PRIx32
+        " I-Space: %" PRIxPTR "\n",
         offset, loadinfo->ispace + sizeof(struct nxflat_hdr_s));
 
   if (offset < loadinfo->dsize)
     {
       addr = (FAR uint32_t *)(offset + loadinfo->dspace->region);
-      binfo("  Before: %08x\n", *addr);
+      binfo("  Before: %08" PRIx32 "\n", *addr);
      *addr += (uint32_t)(loadinfo->ispace + sizeof(struct nxflat_hdr_s));
-      binfo("  After: %08x\n", *addr);
+      binfo("  After: %08" PRIx32 "\n", *addr);
       return OK;
     }
   else
     {
-      berr("Offset: %08 does not lie in D-Space size: %08x\n",
+      berr("Offset: %08" PRIx32 " does not lie in "
+           "D-Space size: %08" PRIx32 "\n",
            offset, loadinfo->dsize);
       return -EINVAL;
     }
@@ -122,20 +125,21 @@ static inline int nxflat_bindrel32d(FAR struct nxflat_loadinfo_s *loadinfo,
 {
   FAR uint32_t *addr;
 
-  binfo("NXFLAT_RELOC_TYPE_REL32D Offset: %08x D-Space: %p\n",
+  binfo("NXFLAT_RELOC_TYPE_REL32D Offset: %08" PRIx32 " D-Space: %p\n",
         offset, loadinfo->dspace->region);
 
   if (offset < loadinfo->dsize)
     {
       addr = (FAR uint32_t *)(offset + loadinfo->dspace->region);
-      binfo("  Before: %08x\n", *addr);
+      binfo("  Before: %08" PRIx32 "\n", *addr);
      *addr += (uint32_t)(loadinfo->dspace->region);
-      binfo("  After: %08x\n", *addr);
+      binfo("  After: %08" PRIx32 "\n", *addr);
       return OK;
     }
   else
     {
-      berr("Offset: %08 does not lie in D-Space size: %08x\n",
+      berr("Offset: %08" PRIx32 " does not lie in "
+           "D-Space size: %08" PRIx32 "\n",
            offset, loadinfo->dsize);
       return -EINVAL;
     }
@@ -314,8 +318,8 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo)
 
         default:
           {
-            berr("ERROR: Unrecognized relocation type: %d\n",
-                 NXFLAT_RELOC_TYPE(reloc.r_info));
+            berr("ERROR: Unrecognized relocation type: %" PRId32 "\n",
+                 (uint32_t)NXFLAT_RELOC_TYPE(reloc.r_info));
             result = -EINVAL;
           }
           break;
@@ -393,7 +397,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo,
 
   offset   = ntohl(hdr->h_importsymbols);
   nimports = ntohs(hdr->h_importcount);
-  binfo("Imports offset: %08x nimports: %d\n", offset, nimports);
+  binfo("Imports offset: %08" PRIx32 " nimports: %d\n", offset, nimports);
 
   /* The import[] table resides within the D-Space allocation.  If
    * CONFIG_ARCH_ADDRENV=y, then that D-Space allocation lies in an address
@@ -438,7 +442,8 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo,
 
       for (i = 0; i < nimports; i++)
         {
-          binfo("Import[%d] (%08p) offset: %08x func: %08x\n",
+          binfo("Import[%d] (%p) "
+                "offset: %08" PRIx32 " func: %08" PRIx32 "\n",
                 i, &imports[i], imports[i].i_funcname,
                 imports[i].i_funcaddress);
 
@@ -474,7 +479,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo,
 
           imports[i].i_funcaddress =  (uint32_t)symbol->sym_value;
 
-          binfo("Bound import[%d] (%08p) to export '%s' (%08x)\n",
+          binfo("Bound import[%d] (%p) to export '%s' (%08" PRIx32 ")\n",
                 i, &imports[i], symname, imports[i].i_funcaddress);
         }
     }


[incubator-nuttx] 08/35: arch/arm/src/lpc17xx_40xx/lpc17_40_serial.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 10cb7ac0edf49aa8ccc55ccd8ce9f23053f004e0
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 16:43:06 2020 +0900

    arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c: Fix syslog formats
---
 arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c
index 42fe047..d3eacc5 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c
@@ -40,6 +40,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <unistd.h>
@@ -1284,7 +1285,7 @@ static int up_interrupt(int irq, void *context, void *arg)
               /* Read the modem status register (MSR) to clear */
 
               status = up_serialin(priv, LPC17_40_UART_MSR_OFFSET);
-              _info("MSR: %02x\n", status);
+              _info("MSR: %02" PRIx32 "\n", status);
               break;
             }
 
@@ -1295,7 +1296,7 @@ static int up_interrupt(int irq, void *context, void *arg)
               /* Read the line status register (LSR) to clear */
 
               status = up_serialin(priv, LPC17_40_UART_LSR_OFFSET);
-              _info("LSR: %02x\n", status);
+              _info("LSR: %02" PRIx32 "\n", status);
               break;
             }
 
@@ -1303,7 +1304,7 @@ static int up_interrupt(int irq, void *context, void *arg)
 
           default:
             {
-              _err("ERROR: Unexpected IIR: %02x\n", status);
+              _err("ERROR: Unexpected IIR: %02" PRIx32 "\n", status);
               break;
             }
         }


[incubator-nuttx] 26/35: net/tcp/tcp_appsend.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 af6719965f450ab8177a8c3f4e4cf0ee9fef7dce
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 19:45:45 2020 +0900

    net/tcp/tcp_appsend.c: Fix syslog formats
---
 net/tcp/tcp_appsend.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/tcp/tcp_appsend.c b/net/tcp/tcp_appsend.c
index f61da7e..fb05f75 100644
--- a/net/tcp/tcp_appsend.c
+++ b/net/tcp/tcp_appsend.c
@@ -44,6 +44,7 @@
 #include <nuttx/config.h>
 #if defined(CONFIG_NET) && defined(CONFIG_NET_TCP)
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <assert.h>
 #include <debug.h>
@@ -85,7 +86,7 @@ void tcp_appsend(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
 {
   uint8_t hdrlen;
 
-  ninfo("result: %04x d_sndlen: %d conn->tx_unacked: %d\n",
+  ninfo("result: %04x d_sndlen: %d conn->tx_unacked: %" PRId32 "\n",
         result, dev->d_sndlen, conn->tx_unacked);
 
 #ifdef CONFIG_NET_TCP_DELAYED_ACK
@@ -271,7 +272,7 @@ void tcp_rexmit(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
 {
   uint8_t hdrlen;
 
-  ninfo("result: %04x d_sndlen: %d conn->tx_unacked: %d\n",
+  ninfo("result: %04x d_sndlen: %d conn->tx_unacked: %" PRId32 "\n",
         result, dev->d_sndlen, conn->tx_unacked);
 
   /* Get the IP header length associated with the IP domain configured for


[incubator-nuttx] 31/35: fs/binfs/fs_binfs.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 e58a966dd60be83140d03ba9264375371a7ec9a8
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 20:11:25 2020 +0900

    fs/binfs/fs_binfs.c: Fix a syslog format
---
 fs/binfs/fs_binfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/binfs/fs_binfs.c b/fs/binfs/fs_binfs.c
index f59e451..9527ff9 100644
--- a/fs/binfs/fs_binfs.c
+++ b/fs/binfs/fs_binfs.c
@@ -193,7 +193,8 @@ static ssize_t binfs_read(FAR struct file *filep,
 {
   /* Reading is not supported.  Just return end-of-file */
 
-  finfo("Read %zu bytes from offset %d\n", buflen, filep->f_pos);
+  finfo("Read %zu bytes from offset %jd\n",
+        buflen, (intmax_t)filep->f_pos);
   return 0;
 }
 


[incubator-nuttx] 07/35: arch/arm/src/arm/arm_undefinedinsn.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 9058792e045f197bdfa85802de054f72c49c57ea
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 14:39:54 2020 +0900

    arch/arm/src/arm/arm_undefinedinsn.c: Fix a syslog format
---
 arch/arm/src/arm/arm_undefinedinsn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/arm/arm_undefinedinsn.c b/arch/arm/src/arm/arm_undefinedinsn.c
index 807d41d..bbb3552 100644
--- a/arch/arm/src/arm/arm_undefinedinsn.c
+++ b/arch/arm/src/arm/arm_undefinedinsn.c
@@ -57,7 +57,7 @@
 
 void arm_undefinedinsn(uint32_t *regs)
 {
-  _alert("Undefined instruction at 0x%x\n", regs[REG_PC]);
+  _alert("Undefined instruction at 0x%" PRIx32 "\n", regs[REG_PC]);
   CURRENT_REGS = regs;
   PANIC();
 }


[incubator-nuttx] 17/35: arch/arm/src/lpc17xx_40xx/lpc17_40_sdcard.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 f1ffb57f3cc9c1102dc6123ece8858c2831a50ba
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 19:14:51 2020 +0900

    arch/arm/src/lpc17xx_40xx/lpc17_40_sdcard.c: Fix syslog formats
---
 arch/arm/src/lpc17xx_40xx/lpc17_40_sdcard.c | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_sdcard.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_sdcard.c
index a866663..1247cb8 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_sdcard.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_sdcard.c
@@ -39,6 +39,7 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <string.h>
@@ -537,7 +538,7 @@ static inline void lpc17_40_setclock(uint32_t clkcr)
   regval |=  clkcr;
   putreg32(regval, LPC17_40_SDCARD_CLOCK);
 
-  mcinfo("CLKCR: %08x PWR: %08x\n",
+  mcinfo("CLKCR: %08" PRIx32 " PWR: %08" PRIx32 "\n",
          getreg32(LPC17_40_SDCARD_CLOCK), getreg32(LPC17_40_SDCARD_PWR));
 }
 
@@ -1515,7 +1516,7 @@ static void lpc17_40_reset(FAR struct sdio_dev_s *dev)
   lpc17_40_setpwrctrl(SDCARD_PWR_CTRL_ON);
   leave_critical_section(flags);
 
-  mcinfo("CLCKR: %08x POWER: %08x\n",
+  mcinfo("CLCKR: %08" PRIx32 " POWER: %08" PRIx32 "\n",
          getreg32(LPC17_40_SDCARD_CLOCK), getreg32(LPC17_40_SDCARD_PWR));
 }
 
@@ -1753,7 +1754,8 @@ static int lpc17_40_sendcmd(FAR struct sdio_dev_s *dev, uint32_t cmd,
   cmdidx  = (cmd & MMCSD_CMDIDX_MASK) >> MMCSD_CMDIDX_SHIFT;
   regval |= cmdidx | SDCARD_CMD_CPSMEN;
 
-  mcinfo("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval);
+  mcinfo("cmd: %08" PRIx32 " arg: %08" PRIx32 " regval: %08" PRIx32 "\n",
+         cmd, arg, regval);
 
   /* Write the SD card CMD */
 
@@ -1990,8 +1992,9 @@ static int lpc17_40_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd)
     {
       if (--timeout <= 0)
         {
-          mcerr("ERROR: Timeout cmd: %08x events: %08x STA: %08x\n",
-               cmd, events, getreg32(LPC17_40_SDCARD_STATUS));
+          mcerr("ERROR: Timeout cmd: %08" PRIx32
+                " events: %08" PRIx32 " STA: %08" PRIx32 "\n",
+                cmd, events, getreg32(LPC17_40_SDCARD_STATUS));
 
           return -ETIMEDOUT;
         }
@@ -2067,7 +2070,7 @@ static int lpc17_40_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd,
            (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R1B_RESPONSE &&
            (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R6_RESPONSE)
     {
-      mcerr("ERROR: Wrong response CMD=%08x\n", cmd);
+      mcerr("ERROR: Wrong response CMD=%08" PRIx32 "\n", cmd);
       ret = -EINVAL;
     }
   else
@@ -2078,12 +2081,12 @@ static int lpc17_40_recvshortcrc(FAR struct sdio_dev_s *dev, uint32_t cmd,
       regval = getreg32(LPC17_40_SDCARD_STATUS);
       if ((regval & SDCARD_STATUS_CTIMEOUT) != 0)
         {
-          mcerr("ERROR: Command timeout: %08x\n", regval);
+          mcerr("ERROR: Command timeout: %08" PRIx32 "\n", regval);
           ret = -ETIMEDOUT;
         }
       else if ((regval & SDCARD_STATUS_CCRCFAIL) != 0)
         {
-          mcerr("ERROR: CRC failure: %08x\n", regval);
+          mcerr("ERROR: CRC failure: %08" PRIx32 "\n", regval);
           ret = -EIO;
         }
 #ifdef CONFIG_DEBUG_FEATURES
@@ -2131,7 +2134,7 @@ static int lpc17_40_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd,
 
   if ((cmd & MMCSD_RESPONSE_MASK) != MMCSD_R2_RESPONSE)
     {
-      mcerr("ERROR: Wrong response CMD=%08x\n", cmd);
+      mcerr("ERROR: Wrong response CMD=%08" PRIx32 "\n", cmd);
       ret = -EINVAL;
     }
   else
@@ -2142,12 +2145,12 @@ static int lpc17_40_recvlong(FAR struct sdio_dev_s *dev, uint32_t cmd,
       regval = getreg32(LPC17_40_SDCARD_STATUS);
       if (regval & SDCARD_STATUS_CTIMEOUT)
         {
-          mcerr("ERROR: Timeout STA: %08x\n", regval);
+          mcerr("ERROR: Timeout STA: %08" PRIx32 "\n", regval);
           ret = -ETIMEDOUT;
         }
       else if (regval & SDCARD_STATUS_CCRCFAIL)
         {
-          mcerr("ERROR: CRC fail STA: %08x\n", regval);
+          mcerr("ERROR: CRC fail STA: %08" PRIx32 "\n", regval);
           ret = -EIO;
         }
     }
@@ -2187,7 +2190,7 @@ static int lpc17_40_recvshort(FAR struct sdio_dev_s *dev, uint32_t cmd,
   if ((cmd & MMCSD_RESPONSE_MASK) != MMCSD_R3_RESPONSE &&
       (cmd & MMCSD_RESPONSE_MASK) != MMCSD_R7_RESPONSE)
     {
-      mcerr("ERROR: Wrong response CMD=%08x\n", cmd);
+      mcerr("ERROR: Wrong response CMD=%08" PRIx32 "\n", cmd);
       ret = -EINVAL;
     }
   else
@@ -2200,7 +2203,7 @@ static int lpc17_40_recvshort(FAR struct sdio_dev_s *dev, uint32_t cmd,
       regval = getreg32(LPC17_40_SDCARD_STATUS);
       if (regval & SDCARD_STATUS_CTIMEOUT)
         {
-          mcerr("ERROR: Timeout STA: %08x\n", regval);
+          mcerr("ERROR: Timeout STA: %08" PRIx32 "\n", regval);
           ret = -ETIMEDOUT;
         }
     }


[incubator-nuttx] 20/35: arch/arm/src/lpc17xx_40xx/lpc17_40_can.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 f7feaa8f7975ee2c1c95a0f4351bdc5b08776ff1
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 19:26:40 2020 +0900

    arch/arm/src/lpc17xx_40xx/lpc17_40_can.c: Appease nxstyle
---
 arch/arm/src/lpc17xx_40xx/lpc17_40_can.c | 81 ++++++++++++++++++++------------
 1 file changed, 52 insertions(+), 29 deletions(-)

diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c
index c44d1fb..b3ca337 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_can.c
@@ -1,4 +1,4 @@
-/************************************************************************************
+/****************************************************************************
  * arch/arm/src/lpc17xx_40xx/lpc17_40_can.c
  *
  *   Copyright (C) 2011 Li Zhuoyi. All rights reserved.
@@ -42,7 +42,11 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- ************************************************************************************/
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
 
 #include <nuttx/config.h>
 
@@ -71,23 +75,24 @@
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
+
 /* Configuration ************************************************************/
 
 #ifdef CONFIG_LPC17_40_CAN1
 
-   /* A CAN bit rate must be provided */
+/* A CAN bit rate must be provided */
 
 #  ifndef CONFIG_LPC17_40_CAN1_BAUD
 #    error "CONFIG_LPC17_40_CAN1_BAUD is not defined"
 #  endif
 
-   /* If no divsor is provided, use a divisor of 4 */
+/* If no divsor is provided, use a divisor of 4 */
 
 #  ifndef CONFIG_LPC17_40_CAN1_DIVISOR
 #    define CONFIG_LPC17_40_CAN1_DIVISOR 4
 #  endif
 
-   /* Get the SYSCON_PCLKSEL value for CAN1 the implements this divisor */
+/* Get the SYSCON_PCLKSEL value for CAN1 the implements this divisor */
 
 #  if CONFIG_LPC17_40_CAN1_DIVISOR == 1
 #    define CAN1_CCLK_DIVISOR SYSCON_PCLKSEL_CCLK
@@ -104,19 +109,19 @@
 
 #ifdef CONFIG_LPC17_40_CAN2
 
-   /* A CAN bit rate must be provided */
+/* A CAN bit rate must be provided */
 
 #  ifndef CONFIG_LPC17_40_CAN2_BAUD
 #    error "CONFIG_LPC17_40_CAN2_BAUD is not defined"
 #  endif
 
-   /* If no divsor is provided, use a divisor of 4 */
+/* If no divsor is provided, use a divisor of 4 */
 
 #  ifndef CONFIG_LPC17_40_CAN2_DIVISOR
 #    define CONFIG_LPC17_40_CAN2_DIVISOR 4
 #  endif
 
-   /* Get the SYSCON_PCLKSEL value for CAN2 the implements this divisor */
+/* Get the SYSCON_PCLKSEL value for CAN2 the implements this divisor */
 
 #  if CONFIG_LPC17_40_CAN2_DIVISOR == 1
 #    define CAN2_CCLK_DIVISOR SYSCON_PCLKSEL_CCLK
@@ -157,6 +162,7 @@
 #define CAN_BIT_QUANTA (CONFIG_LPC17_40_CAN_TSEG1 + CONFIG_LPC17_40_CAN_TSEG2 + 1)
 
 /* Debug ********************************************************************/
+
 /* Non-standard debug that may be enabled just for testing CAN */
 
 #ifndef CONFIG_DEBUG_CAN_INFO
@@ -164,6 +170,7 @@
 #endif
 
 /* Timing *******************************************************************/
+
 /* CAN clocking is provided at CCLK divided by the configured divisor */
 
 #ifdef BOARD_CCLKSEL_DIVIDER
@@ -188,6 +195,7 @@ struct up_dev_s
 /****************************************************************************
  * Private Function Prototypes
  ****************************************************************************/
+
 /* CAN Register access */
 
 #ifdef CONFIG_LPC17_40_CAN_REGDEBUG
@@ -212,9 +220,11 @@ static int  lpc17can_setup(FAR struct can_dev_s *dev);
 static void lpc17can_shutdown(FAR struct can_dev_s *dev);
 static void lpc17can_rxint(FAR struct can_dev_s *dev, bool enable);
 static void lpc17can_txint(FAR struct can_dev_s *dev, bool enable);
-static int  lpc17can_ioctl(FAR struct can_dev_s *dev, int cmd, unsigned long arg);
+static int  lpc17can_ioctl(FAR struct can_dev_s *dev, int cmd,
+                           unsigned long arg);
 static int  lpc17can_remoterequest(FAR struct can_dev_s *dev, uint16_t id);
-static int  lpc17can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg);
+static int  lpc17can_send(FAR struct can_dev_s *dev,
+                          FAR struct can_msg_s *msg);
 static bool lpc17can_txready(FAR struct can_dev_s *dev);
 static bool lpc17can_txempty(FAR struct can_dev_s *dev);
 
@@ -280,6 +290,7 @@ static struct can_dev_s g_can2dev =
 /****************************************************************************
  * Private Functions
  ****************************************************************************/
+
 /****************************************************************************
  * Name: can_printreg
  *
@@ -329,7 +340,7 @@ static void can_printreg(uint32_t addr, uint32_t value)
         {
           /* Yes.. then show how many times the value repeated */
 
-          caninfo("[repeats %d more times]\n", count-3);
+          caninfo("[repeats %d more times]\n", count - 3);
         }
 
       /* Save the new address, value, and count */
@@ -653,8 +664,8 @@ static void lpc17can_txint(FAR struct can_dev_s *dev, bool enable)
 
   if (!enable)
     {
-      /* TX interrupts are also disabled from the interrupt handler, so we have
-       * to protect this code section.
+      /* TX interrupts are also disabled from the interrupt handler, so we
+       * have to protect this code section.
        */
 
       flags = enter_critical_section();
@@ -666,7 +677,6 @@ static void lpc17can_txint(FAR struct can_dev_s *dev, bool enable)
       can_putreg(priv, LPC17_40_CAN_IER_OFFSET, regval);
       leave_critical_section(flags);
     }
-
 }
 
 /****************************************************************************
@@ -683,7 +693,8 @@ static void lpc17can_txint(FAR struct can_dev_s *dev, bool enable)
  *
  ****************************************************************************/
 
-static int lpc17can_ioctl(FAR struct can_dev_s *dev, int cmd, unsigned long arg)
+static int lpc17can_ioctl(FAR struct can_dev_s *dev, int cmd,
+                          unsigned long arg)
 {
   canerr("ERROR: Fix me -- Not Implemented\n");
   return 0;
@@ -732,7 +743,8 @@ static int lpc17can_remoterequest(FAR struct can_dev_s *dev, uint16_t id)
  *
  ****************************************************************************/
 
-static int lpc17can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg)
+static int lpc17can_send(FAR struct can_dev_s *dev,
+                         FAR struct can_msg_s *msg)
 {
   FAR struct up_dev_s *priv = (FAR struct up_dev_s *)dev->cd_priv;
   uint32_t tid = (uint32_t)msg->cm_hdr.ch_id;
@@ -793,8 +805,10 @@ static int lpc17can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg)
 
       can_putreg(priv, LPC17_40_CAN_TFI1_OFFSET, tfi);
       can_putreg(priv, LPC17_40_CAN_TID1_OFFSET, tid);
-      can_putreg(priv, LPC17_40_CAN_TDA1_OFFSET, *(uint32_t *)&msg->cm_data[0]);
-      can_putreg(priv, LPC17_40_CAN_TDB1_OFFSET, *(uint32_t *)&msg->cm_data[4]);
+      can_putreg(priv, LPC17_40_CAN_TDA1_OFFSET,
+                 *(uint32_t *)&msg->cm_data[0]);
+      can_putreg(priv, LPC17_40_CAN_TDB1_OFFSET,
+                 *(uint32_t *)&msg->cm_data[4]);
 
       /* Send the message */
 
@@ -823,8 +837,10 @@ static int lpc17can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg)
 
       can_putreg(priv, LPC17_40_CAN_TFI2_OFFSET, tfi);
       can_putreg(priv, LPC17_40_CAN_TID2_OFFSET, tid);
-      can_putreg(priv, LPC17_40_CAN_TDA2_OFFSET, *(uint32_t *)&msg->cm_data[0]);
-      can_putreg(priv, LPC17_40_CAN_TDB2_OFFSET, *(uint32_t *)&msg->cm_data[4]);
+      can_putreg(priv, LPC17_40_CAN_TDA2_OFFSET,
+                 *(uint32_t *)&msg->cm_data[0]);
+      can_putreg(priv, LPC17_40_CAN_TDB2_OFFSET,
+                 *(uint32_t *)&msg->cm_data[4]);
 
       /* Send the message */
 
@@ -853,8 +869,10 @@ static int lpc17can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg)
 
       can_putreg(priv, LPC17_40_CAN_TFI3_OFFSET, tfi);
       can_putreg(priv, LPC17_40_CAN_TID3_OFFSET, tid);
-      can_putreg(priv, LPC17_40_CAN_TDA3_OFFSET, *(uint32_t *)&msg->cm_data[0]);
-      can_putreg(priv, LPC17_40_CAN_TDB3_OFFSET, *(uint32_t *)&msg->cm_data[4]);
+      can_putreg(priv, LPC17_40_CAN_TDA3_OFFSET,
+                 *(uint32_t *)&msg->cm_data[0]);
+      can_putreg(priv, LPC17_40_CAN_TDB3_OFFSET,
+                 *(uint32_t *)&msg->cm_data[4]);
 
       /* Send the message */
 
@@ -943,7 +961,9 @@ static void can_interrupt(FAR struct can_dev_s *dev)
   uint32_t rid;
   uint32_t regval;
 
-  /* Read the interrupt and capture register (also clearing most status bits) */
+  /* Read the interrupt and capture register (also clearing most status
+   * bits)
+   */
 
   regval = can_getreg(priv, LPC17_40_CAN_ICR_OFFSET);
   caninfo("CAN%d ICR: %08x\n",  priv->port, regval);
@@ -976,7 +996,8 @@ static void can_interrupt(FAR struct can_dev_s *dev)
 
       if ((rfs & CAN_RFS_FF) != 0)
         {
-          canerr("ERROR: Received message with extended identifier.  Dropped\n");
+          canerr("ERROR: Received message with extended identifier.  "
+                 "Dropped\n");
         }
       else
 #endif
@@ -1111,7 +1132,8 @@ static int can12_interrupt(int irq, void *context, FAR void *arg)
  *   Tq = brp * Tcan
  *
  * Where:
- *   Tcan is the period of the APB clock (PCLK = CCLK / CONFIG_LPC17_40_CAN1_DIVISOR).
+ *   Tcan is the period of the APB clock (PCLK =
+ *   CCLK / CONFIG_LPC17_40_CAN1_DIVISOR).
  *
  * Input Parameters:
  *   priv - A reference to the CAN block status
@@ -1168,9 +1190,9 @@ static int can_bittiming(struct up_dev_s *priv)
         }
     }
 
-  /* Otherwise, nquanta is CAN_BIT_QUANTA, ts1 is CONFIG_LPC17_40_CAN_TSEG1, ts2 is
-   * CONFIG_LPC17_40_CAN_TSEG2 and we calculate brp to achieve CAN_BIT_QUANTA quanta
-   * in the bit time
+  /* Otherwise, nquanta is CAN_BIT_QUANTA, ts1 is CONFIG_LPC17_40_CAN_TSEG1,
+   * ts2 is CONFIG_LPC17_40_CAN_TSEG2 and we calculate brp to achieve
+   * CAN_BIT_QUANTA quanta in the bit time
    */
 
   else
@@ -1178,7 +1200,7 @@ static int can_bittiming(struct up_dev_s *priv)
       ts1 = CONFIG_LPC17_40_CAN_TSEG1;
       ts2 = CONFIG_LPC17_40_CAN_TSEG2;
       brp = (nclks + (CAN_BIT_QUANTA / 2)) / CAN_BIT_QUANTA;
-      DEBUGASSERT(brp >=1 && brp <= CAN_BTR_BRP_MAX);
+      DEBUGASSERT(brp >= 1 && brp <= CAN_BTR_BRP_MAX);
     }
 
   sjw = 1;
@@ -1208,6 +1230,7 @@ static int can_bittiming(struct up_dev_s *priv)
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
+
 /****************************************************************************
  * Name: lpc17_40_caninitialize
  *