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/28 05:38:58 UTC

[incubator-nuttx] 05/24: arch/arm/src/nrf52/nrf52_wdt_lowerhalf.c: Fix syslog formats

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 b22ad6fbb868ef6a8c51e0090e5bf28a4b11c378
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Nov 28 09:23:17 2020 +0900

    arch/arm/src/nrf52/nrf52_wdt_lowerhalf.c: Fix syslog formats
---
 arch/arm/src/nrf52/nrf52_wdt_lowerhalf.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/arm/src/nrf52/nrf52_wdt_lowerhalf.c b/arch/arm/src/nrf52/nrf52_wdt_lowerhalf.c
index 3e540a5..3f454b4 100644
--- a/arch/arm/src/nrf52/nrf52_wdt_lowerhalf.c
+++ b/arch/arm/src/nrf52/nrf52_wdt_lowerhalf.c
@@ -41,6 +41,7 @@
 #include <nuttx/config.h>
 #include <nuttx/arch.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <errno.h>
 #include <debug.h>
@@ -179,7 +180,7 @@ static int nrf52_start(FAR struct watchdog_lowerhalf_s *lower)
     (FAR struct nrf52_wdt_lowerhalf_s *)lower;
   irqstate_t flags;
 
-  wdinfo("Entry: started=%d\n");
+  wdinfo("Entry: started\n");
   DEBUGASSERT(priv);
 
   /* Have we already been started? */
@@ -311,9 +312,9 @@ static int nrf52_getstatus(FAR struct watchdog_lowerhalf_s *lower,
   status->timeleft = status->timeout - elapsed;
 
   wdinfo("Status     :\n");
-  wdinfo("  flags    : %08x\n", status->flags);
-  wdinfo("  timeout  : %d\n", status->timeout);
-  wdinfo("  timeleft : %d\n", status->timeleft);
+  wdinfo("  flags    : %08" PRIx32 "\n", status->flags);
+  wdinfo("  timeout  : %" PRId32 "\n", status->timeout);
+  wdinfo("  timeleft : %" PRId32 "\n", status->timeleft);
   return OK;
 }
 
@@ -339,14 +340,14 @@ static int nrf52_settimeout(FAR struct watchdog_lowerhalf_s *lower,
   FAR struct nrf52_wdt_lowerhalf_s *priv =
     (FAR struct nrf52_wdt_lowerhalf_s *)lower;
 
-  wdinfo("Entry: timeout=%d\n", timeout);
+  wdinfo("Entry: timeout=%" PRId32 "\n", timeout);
   DEBUGASSERT(priv);
 
   /* Can this timeout be represented? */
 
   if (timeout < 1 || timeout > WDT_MAXTIMEOUT)
     {
-      wderr("ERROR: Cannot represent timeout=%d > %d\n",
+      wderr("ERROR: Cannot represent timeout=%" PRId32 " > %d\n",
             timeout, WDT_MAXTIMEOUT);
       return -ERANGE;
     }