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/27 11:19:35 UTC
[incubator-nuttx] 28/48: arch/arm/src/cxd56xx/cxd56_timer.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 8e0a7d887e001b47efc664f2ea85b288a12358e7
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 17:34:55 2020 +0900
arch/arm/src/cxd56xx/cxd56_timer.c: Fix syslog formats
---
arch/arm/src/cxd56xx/cxd56_timer.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/arch/arm/src/cxd56xx/cxd56_timer.c b/arch/arm/src/cxd56xx/cxd56_timer.c
index 097b8b2..9682147 100644
--- a/arch/arm/src/cxd56xx/cxd56_timer.c
+++ b/arch/arm/src/cxd56xx/cxd56_timer.c
@@ -42,6 +42,7 @@
#include <sys/types.h>
+#include <inttypes.h>
#include <stdint.h>
#include <limits.h>
#include <errno.h>
@@ -351,9 +352,9 @@ static int cxd56_getstatus(FAR struct timer_lowerhalf_s *lower,
status->timeleft =
(uint32_t)(remaining * 1000000ULL * TIMER_DIVIDER / priv->clkticks);
- tmrinfo(" flags : %08x\n", status->flags);
- tmrinfo(" timeout : %d\n", status->timeout);
- tmrinfo(" timeleft : %d\n", status->timeleft);
+ tmrinfo(" flags : %08" PRIx32 "\n", status->flags);
+ tmrinfo(" timeout : %" PRId32 "\n", status->timeout);
+ tmrinfo(" timeleft : %" PRId32 "\n", status->timeleft);
return OK;
}
@@ -386,7 +387,7 @@ static int cxd56_settimeout(FAR struct timer_lowerhalf_s *lower,
return -EPERM;
}
- tmrinfo("Entry: timeout=%d\n", timeout);
+ tmrinfo("Entry: timeout=%" PRId32 "\n", timeout);
/* Can this timeout be represented? */
@@ -410,8 +411,8 @@ static int cxd56_settimeout(FAR struct timer_lowerhalf_s *lower,
modifyreg32(priv->base + CXD56_TIMER_CONTROL, 0,
TIMERCTRL_PERIODIC | TIMERCTRL_INTENABLE);
- tmrinfo("clkticks=%d timeout=%d load=%d\n", priv->clkticks, priv->timeout,
- load);
+ tmrinfo("clkticks=%" PRId32 " timeout=%" PRId32 " load=%" PRId32 "\n",
+ priv->clkticks, priv->timeout, load);
return OK;
}