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 <yamam...@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) */