You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/25 06:32:06 UTC
[incubator-nuttx] 23/28: arch/arm/src/stm32f7/stm32_ethernet.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 b299fdf1e3c62f4573faf42949ae1412a7559232
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 10:32:49 2020 +0900
arch/arm/src/stm32f7/stm32_ethernet.c: Fix syslog formats
---
arch/arm/src/stm32f7/stm32_ethernet.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/arch/arm/src/stm32f7/stm32_ethernet.c b/arch/arm/src/stm32f7/stm32_ethernet.c
index 4c4b205..a7509fd 100644
--- a/arch/arm/src/stm32f7/stm32_ethernet.c
+++ b/arch/arm/src/stm32f7/stm32_ethernet.c
@@ -39,6 +39,7 @@
#include <nuttx/config.h>
+#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <time.h>
@@ -1085,7 +1086,7 @@ static int stm32_transmit(struct stm32_ethmac_s *priv)
txdesc = priv->txhead;
txfirst = txdesc;
- ninfo("d_len: %d d_buf: %p txhead: %p tdes0: %08x\n",
+ ninfo("d_len: %d d_buf: %p txhead: %p tdes0: %08" PRIx32 "\n",
priv->dev.d_len, priv->dev.d_buf, txdesc, txdesc->tdes0);
DEBUGASSERT(txdesc && (txdesc->tdes0 & ETH_TDES0_OWN) == 0);
@@ -1751,7 +1752,7 @@ static int stm32_recvframe(struct stm32_ethmac_s *priv)
* scanning logic, and continue scanning with the next frame.
*/
- nwarn("WARNING: DROPPED RX descriptor errors: %08x\n",
+ nwarn("WARNING: DROPPED RX descriptor errors: %08" PRIx32 "\n",
rxdesc->rdes0);
stm32_freesegment(priv, rxcurr, priv->segments);
}
@@ -1995,7 +1996,8 @@ static void stm32_freeframe(struct stm32_ethmac_s *priv)
* TX descriptors.
*/
- ninfo("txtail: %p tdes0: %08x tdes2: %08x tdes3: %08x\n",
+ ninfo("txtail: %p tdes0: %08" PRIx32
+ " tdes2: %08" PRIx32 " tdes3: %08" PRIx32 "\n",
txdesc, txdesc->tdes0, txdesc->tdes2, txdesc->tdes3);
DEBUGASSERT(txdesc->tdes2 != 0);
@@ -2474,8 +2476,10 @@ static int stm32_ifup(struct net_driver_s *dev)
#ifdef CONFIG_NET_IPv4
ninfo("Bringing up: %d.%d.%d.%d\n",
- dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
- (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
+ (int)(dev->d_ipaddr & 0xff),
+ (int)((dev->d_ipaddr >> 8) & 0xff),
+ (int)((dev->d_ipaddr >> 16) & 0xff),
+ (int)(dev->d_ipaddr >> 24));
#endif
#ifdef CONFIG_NET_IPv6
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",