From ec8a46b2fa3c1571e1d31f39b9e3404041387b02 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Mon, 23 Nov 2020 20:20:58 +0900 Subject: [PATCH] arch/arm/src/stm32h7/stm32_ethernet.c: Fix syslog formats --- arch/arm/src/stm32h7/stm32_ethernet.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/arm/src/stm32h7/stm32_ethernet.c b/arch/arm/src/stm32h7/stm32_ethernet.c index d73f2f2610..a829fdc328 100644 --- a/arch/arm/src/stm32h7/stm32_ethernet.c +++ b/arch/arm/src/stm32h7/stm32_ethernet.c @@ -24,6 +24,7 @@ #include +#include #include #include #include @@ -1103,7 +1104,7 @@ static int stm32_transmit(struct stm32_ethmac_s *priv) txdesc = priv->txhead; txfirst = txdesc; - ninfo("d_len: %d d_buf: %p txhead: %p tdes3: %08x\n", + ninfo("d_len: %d d_buf: %p txhead: %p tdes3: %08" PRIx32 "\n", priv->dev.d_len, priv->dev.d_buf, txdesc, txdesc->des3); DEBUGASSERT(txdesc); @@ -1824,7 +1825,8 @@ static int stm32_recvframe(struct stm32_ethmac_s *priv) * next frame. */ - nwarn("WARNING: DROPPED RX descriptor errors: %08x\n", + nwarn("WARNING: DROPPED RX descriptor errors: " + "%08" PRIx32 "\n", rxdesc->des3); stm32_freesegment(priv, rxcurr, priv->segments); } @@ -2083,7 +2085,8 @@ static void stm32_freeframe(struct stm32_ethmac_s *priv) * TX descriptors. */ - ninfo("txtail: %p des0: %08x des2: %08x des3: %08x\n", + ninfo("txtail: %p des0: %08" PRIx32 + " des2: %08" PRIx32 " des3: %08" PRIx32 "\n", txdesc, txdesc->des0, txdesc->des2, txdesc->des3); DEBUGASSERT(txdesc->des0 != 0); @@ -2565,8 +2568,8 @@ 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",