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/12/06 13:41:50 UTC
[incubator-nuttx] branch master updated (ec83dc2 -> faa2310)
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.
from ec83dc2 nxstyle fixes
new 59dc739 arch/arm/src/sama5/sam_ssc.c: Fix syslog formats
new c8eb8ac arch/arm/src/sama5/sam_xdmac.c: Appease nxstyle
new c3bcf80 arch/arm/src/sama5/sam_xdmac.c: Fix syslog formats
new 3152ee6 arch/arm/src/sama5/sam_emacb.c: Fix syslog formats
new 51b6a3c libs/libc/machine/arm/armv7-a/arch_elf.c: Appease nxstyle
new 0117d2b libs/libc/machine/arm/armv7-a/arch_elf.c: Fix syslog formats
new 83b24f0 arch/arm/src/armv7-a/arm_syscall.c: Fix syslog formats
new b69dbbc boards/arm/sama5/sama5d4-ek/src/sam_at25.c: Appease nxstyle
new 3599120 boards/arm/sama5/sama5d4-ek/src/sam_at25.c: Fix a syslog format
new 2d78501 drivers/audio/audio_null.c: Fix a syslog format
new 8af7af1 arch/arm/src/sama5/sam_emacb.c: Fix a syslog format
new 8eb0712 arch/arm/src/sam34/sam_hsmci.c: Fix syslog formats
new f22982f arch/arm/src/sam34/sam_wdt.c: Appease nxstyle
new fcca968 arch/arm/src/sam34/sam_wdt.c: Fix syslog formats
new 6c269e8 drivers/mtd/mtd_onfi.c: Fix syslog formats
new 5461bb2 arch/arm/src/sam34/sam4s_nand.c: Fix syslog formats
new 2829ecd arch/arm/src/sam34/sam_spi.c: Fix syslog formats
new c007f70 boards/arm/sam34/sam3u-ek/src/sam_lcd.c: Appease nxstyle
new 61579ed boards/arm/sam34/sam3u-ek/src/sam_lcd.c: Fix syslog formats
new fbf7d7c arch/arm/src/sam34/sam_emac.c: Fix syslog formats
new 392c294 boards/arm/sam34/sam4e-ek/src/sam_at25.c: Appease nxstyle
new 46974c2 boards/arm/sam34/sam4e-ek/src/sam_at25.c: Fix a syslog format
new cba6e69 arch/arm/src/s32k1xx/s32k1xx_lpi2c.c: Fix syslog formats
new 1c7bdce arch/arm/src/s32k1xx/s32k1xx_lpspi.c: Fix a syslog format
new 6079546 boards/arm/s32k1xx/rddrone-uavcan146/src/s32k1xx_bringup.c: Fix syslog formats
new a600b24 arch/arm/src/s32k1xx/s32k1xx_flexcan.c: Fix syslog formats
new faa2310 boards/arm/s32k1xx/rddrone-uavcan144/src/s32k1xx_bringup.c: Fix syslog formats
The 27 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
arch/arm/src/armv7-a/arm_syscall.c | 21 +++---
arch/arm/src/s32k1xx/s32k1xx_flexcan.c | 9 +--
arch/arm/src/s32k1xx/s32k1xx_lpi2c.c | 5 +-
arch/arm/src/s32k1xx/s32k1xx_lpspi.c | 4 +-
arch/arm/src/sam34/sam4s_nand.c | 10 +--
arch/arm/src/sam34/sam_emac.c | 29 ++++----
arch/arm/src/sam34/sam_hsmci.c | 20 +++---
arch/arm/src/sam34/sam_spi.c | 14 ++--
arch/arm/src/sam34/sam_wdt.c | 81 ++++++++++++----------
arch/arm/src/sama5/sam_emacb.c | 29 ++++----
arch/arm/src/sama5/sam_ssc.c | 7 +-
arch/arm/src/sama5/sam_xdmac.c | 10 ++-
.../rddrone-uavcan144/src/s32k1xx_bringup.c | 4 +-
.../rddrone-uavcan146/src/s32k1xx_bringup.c | 4 +-
boards/arm/sam34/sam3u-ek/src/sam_lcd.c | 21 +++---
boards/arm/sam34/sam4e-ek/src/sam_at25.c | 3 +-
boards/arm/sama5/sama5d4-ek/src/sam_at25.c | 3 +-
drivers/audio/audio_null.c | 2 +-
drivers/mtd/mtd_onfi.c | 19 ++---
libs/libc/machine/arm/armv7-a/arch_elf.c | 44 ++++++++----
20 files changed, 201 insertions(+), 138 deletions(-)
[incubator-nuttx] 11/27: arch/arm/src/sama5/sam_emacb.c: Fix a
syslog format
Posted by xi...@apache.org.
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 8af7af12b385ede1be95d02600d491e22cb389df
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Dec 5 22:32:54 2020 +0900
arch/arm/src/sama5/sam_emacb.c: Fix a syslog format
---
arch/arm/src/sama5/sam_emacb.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/src/sama5/sam_emacb.c b/arch/arm/src/sama5/sam_emacb.c
index c70b7c5..9173372 100644
--- a/arch/arm/src/sama5/sam_emacb.c
+++ b/arch/arm/src/sama5/sam_emacb.c
@@ -2247,8 +2247,10 @@ static int sam_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",
[incubator-nuttx] 05/27: libs/libc/machine/arm/armv7-a/arch_elf.c:
Appease nxstyle
Posted by xi...@apache.org.
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 51b6a3cd1a235ba28c157289f2f5ea9bd0f808b5
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Dec 5 22:13:28 2020 +0900
libs/libc/machine/arm/armv7-a/arch_elf.c: Appease nxstyle
---
libs/libc/machine/arm/armv7-a/arch_elf.c | 37 +++++++++++++++++++++-----------
1 file changed, 25 insertions(+), 12 deletions(-)
diff --git a/libs/libc/machine/arm/armv7-a/arch_elf.c b/libs/libc/machine/arm/armv7-a/arch_elf.c
index 0cbdd41..73ba3db 100644
--- a/libs/libc/machine/arm/armv7-a/arch_elf.c
+++ b/libs/libc/machine/arm/armv7-a/arch_elf.c
@@ -80,7 +80,8 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
if (ehdr->e_ident[EI_CLASS] != ELFCLASS32)
{
- berr("ERROR: Need 32-bit objects: e_ident[EI_CLASS]=%02x\n", ehdr->e_ident[EI_CLASS]);
+ berr("ERROR: Need 32-bit objects: e_ident[EI_CLASS]=%02x\n",
+ ehdr->e_ident[EI_CLASS]);
return false;
}
@@ -92,7 +93,8 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
if (ehdr->e_ident[EI_DATA] != ELFDATA2LSB)
#endif
{
- berr("ERROR: Wrong endian-ness: e_ident[EI_DATA]=%02x\n", ehdr->e_ident[EI_DATA]);
+ berr("ERROR: Wrong endian-ness: e_ident[EI_DATA]=%02x\n",
+ ehdr->e_ident[EI_DATA]);
return false;
}
@@ -100,11 +102,13 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
if ((ehdr->e_entry & 3) != 0)
{
- berr("ERROR: Entry point is not properly aligned: %08x\n", ehdr->e_entry);
+ berr("ERROR: Entry point is not properly aligned: %08x\n",
+ ehdr->e_entry);
return false;
}
/* TODO: Check ABI here. */
+
return true;
}
@@ -160,8 +164,10 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
case R_ARM_CALL:
case R_ARM_JUMP24:
{
- binfo("Performing PC24 [%d] link at addr %08lx [%08lx] to sym '%p' st_value=%08lx\n",
- ELF32_R_TYPE(rel->r_info), (long)addr, (long)(*(uint32_t *)addr),
+ binfo("Performing PC24 [%d] link "
+ "at addr %08lx [%08lx] to sym '%p' st_value=%08lx\n",
+ ELF32_R_TYPE(rel->r_info), (long)addr,
+ (long)(*(uint32_t *)addr),
sym, (long)sym->st_value);
offset = (*(uint32_t *)addr & 0x00ffffff) << 2;
@@ -171,7 +177,8 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
}
offset += sym->st_value - addr;
- if (offset & 3 || offset < (int32_t) 0xfe000000 || offset >= (int32_t) 0x02000000)
+ if (offset & 3 || offset < (int32_t) 0xfe000000 ||
+ offset >= (int32_t) 0x02000000)
{
berr("ERROR: PC24 [%d] relocation out of range, offset=%08lx\n",
ELF32_R_TYPE(rel->r_info), offset);
@@ -189,8 +196,10 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
case R_ARM_ABS32:
case R_ARM_TARGET1: /* New ABI: TARGET1 always treated as ABS32 */
{
- binfo("Performing ABS32 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n",
- (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value);
+ binfo("Performing ABS32 link "
+ "at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n",
+ (long)addr, (long)(*(uint32_t *)addr), sym,
+ (long)sym->st_value);
*(uint32_t *)addr += sym->st_value;
}
@@ -213,8 +222,10 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
case R_ARM_PREL31:
{
- binfo("Performing PREL31 link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n",
- (long)addr, (long)(*(uint32_t *)addr), sym, (long)sym->st_value);
+ binfo("Performing PREL31 link "
+ "at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n",
+ (long)addr, (long)(*(uint32_t *)addr), sym,
+ (long)sym->st_value);
offset = *(uint32_t *)addr + sym->st_value - addr;
*(uint32_t *)addr = offset & 0x7fffffff;
@@ -224,8 +235,10 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
case R_ARM_MOVW_ABS_NC:
case R_ARM_MOVT_ABS:
{
- binfo("Performing MOVx_ABS [%d] link at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n",
- ELF32_R_TYPE(rel->r_info), (long)addr, (long)(*(uint32_t *)addr),
+ binfo("Performing MOVx_ABS [%d] link "
+ "at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n",
+ ELF32_R_TYPE(rel->r_info), (long)addr,
+ (long)(*(uint32_t *)addr),
sym, (long)sym->st_value);
offset = *(uint32_t *)addr;
[incubator-nuttx] 01/27: arch/arm/src/sama5/sam_ssc.c: Fix syslog
formats
Posted by xi...@apache.org.
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 59dc73989525a20ac25e41c1cbcce500712c76ad
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Dec 5 22:01:53 2020 +0900
arch/arm/src/sama5/sam_ssc.c: Fix syslog formats
---
arch/arm/src/sama5/sam_ssc.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/arm/src/sama5/sam_ssc.c b/arch/arm/src/sama5/sam_ssc.c
index 1b9a724..220723c 100644
--- a/arch/arm/src/sama5/sam_ssc.c
+++ b/arch/arm/src/sama5/sam_ssc.c
@@ -25,6 +25,7 @@
#include <nuttx/config.h>
#include <sys/types.h>
+#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -2195,7 +2196,7 @@ static int ssc_receive(struct i2s_dev_s *dev, struct ap_buffer_s *apb,
#endif
DEBUGASSERT(priv && apb && ((uintptr_t)apb->samp & priv->align) == 0);
- i2sinfo("apb=%p nmaxbytes=%d arg=%p timeout=%d\n",
+ i2sinfo("apb=%p nmaxbytes=%d arg=%p timeout=%" PRId32 "\n",
apb, apb->nmaxbytes, arg, timeout);
ssc_init_buffer(apb->samp, apb->nmaxbytes);
@@ -2416,7 +2417,7 @@ static int ssc_send(struct i2s_dev_s *dev, struct ap_buffer_s *apb,
*/
DEBUGASSERT(priv && apb);
- i2sinfo("apb=%p nbytes=%d arg=%p timeout=%d\n",
+ i2sinfo("apb=%p nbytes=%d arg=%p timeout=%" PRId32 "\n",
apb, apb->nbytes - apb->curbyte, arg, timeout);
ssc_dump_buffer("Sending", &apb->samp[apb->curbyte],
@@ -2913,7 +2914,7 @@ static void ssc_clocking(struct sam_ssc_s *priv)
sam_enableperiph1(priv->pid);
- i2sinfo("PCSR1=%08x PCR=%08x CMR=%08x\n",
+ i2sinfo("PCSR1=%08" PRIx32 " PCR=%08" PRIx32 " CMR=%08" PRIx32 "\n",
getreg32(SAM_PMC_PCSR1), regval,
ssc_getreg(priv, SAM_SSC_CMR_OFFSET));
}
[incubator-nuttx] 17/27: arch/arm/src/sam34/sam_spi.c: Fix syslog
formats
Posted by xi...@apache.org.
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 2829ecd18a43a37e2ec7962831e3cbf640b19d62
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Dec 6 09:53:53 2020 +0900
arch/arm/src/sam34/sam_spi.c: Fix syslog formats
---
arch/arm/src/sam34/sam_spi.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/arch/arm/src/sam34/sam_spi.c b/arch/arm/src/sam34/sam_spi.c
index ae7b982..50ff506 100644
--- a/arch/arm/src/sam34/sam_spi.c
+++ b/arch/arm/src/sam34/sam_spi.c
@@ -42,6 +42,7 @@
#include <nuttx/config.h>
#include <sys/types.h>
+#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -984,7 +985,7 @@ static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency)
uint32_t regval;
unsigned int offset;
- spiinfo("cs=%d frequency=%d\n", spics->cs, frequency);
+ spiinfo("cs=%d frequency=%" PRId32 "\n", spics->cs, frequency);
/* Check if the requested frequency is the same as the frequency
* selection
@@ -1057,14 +1058,15 @@ static uint32_t spi_setfrequency(struct spi_dev_s *dev, uint32_t frequency)
/* Calculate the new actual frequency */
actual = SAM_SPI_CLOCK / scbr;
- spiinfo("csr[offset=%02x]=%08x actual=%d\n", offset, regval, actual);
+ spiinfo("csr[offset=%02x]=%08" PRIx32 " actual=%" PRId32 "\n",
+ offset, regval, actual);
/* Save the frequency setting */
spics->frequency = frequency;
spics->actual = actual;
- spiinfo("Frequency %d->%d\n", frequency, actual);
+ spiinfo("Frequency %" PRId32 "->%" PRId32 "\n", frequency, actual);
return actual;
}
@@ -1133,7 +1135,7 @@ static void spi_setmode(struct spi_dev_s *dev, enum spi_mode_e mode)
}
spi_putreg(spi, regval, offset);
- spiinfo("csr[offset=%02x]=%08x\n", offset, regval);
+ spiinfo("csr[offset=%02x]=%08" PRIx32 "\n", offset, regval);
/* Save the mode so that subsequent re-configurations will be faster */
@@ -1178,7 +1180,7 @@ static void spi_setbits(struct spi_dev_s *dev, int nbits)
regval |= SPI_CSR_BITS(nbits);
spi_putreg(spi, regval, offset);
- spiinfo("csr[offset=%02x]=%08x\n", offset, regval);
+ spiinfo("csr[offset=%02x]=%08" PRIx32 "\n", offset, regval);
/* Save the selection so the subsequent re-configurations will be
* faster.
@@ -1905,7 +1907,7 @@ struct spi_dev_s *sam_spibus_initialize(int port)
spi_putreg(spi, regval, offset);
spics->nbits = 8;
- spiinfo("csr[offset=%02x]=%08x\n", offset, regval);
+ spiinfo("csr[offset=%02x]=%08" PRIx32 "\n", offset, regval);
return &spics->spidev;
}
[incubator-nuttx] 14/27: arch/arm/src/sam34/sam_wdt.c: Fix syslog
formats
Posted by xi...@apache.org.
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 fcca968c0b064be8e0aa4e6429a88c77b1391d2d
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Dec 5 22:47:33 2020 +0900
arch/arm/src/sam34/sam_wdt.c: Fix syslog formats
---
arch/arm/src/sam34/sam_wdt.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/arch/arm/src/sam34/sam_wdt.c b/arch/arm/src/sam34/sam_wdt.c
index 5ae0fd0..c427344 100644
--- a/arch/arm/src/sam34/sam_wdt.c
+++ b/arch/arm/src/sam34/sam_wdt.c
@@ -43,6 +43,7 @@
#include <sys/types.h>
+#include <inttypes.h>
#include <stdint.h>
#include <errno.h>
#include <debug.h>
@@ -440,10 +441,10 @@ static int sam34_getstatus(FAR struct watchdog_lowerhalf_s *lower,
status->timeleft = (priv->timeout * elapsed) / (priv->reload + 1);
- wdinfo("Status : %08x\n", sam34_getreg(SAM_WDT_SR));
- wdinfo(" flags : %08x\n", status->flags);
- wdinfo(" timeout : %d\n", status->timeout);
- wdinfo(" timeleft : %d\n", status->timeleft);
+ wdinfo("Status : %08" PRIx32 "\n", sam34_getreg(SAM_WDT_SR));
+ wdinfo(" flags : %08" PRIx32 "\n", status->flags);
+ wdinfo(" timeout : %" PRId32 "\n", status->timeout);
+ wdinfo(" timeleft : %" PRId32 "\n", status->timeleft);
return OK;
}
@@ -470,13 +471,13 @@ static int sam34_settimeout(FAR struct watchdog_lowerhalf_s *lower,
uint32_t reload;
DEBUGASSERT(priv);
- wdinfo("Entry: timeout=%d\n", timeout);
+ wdinfo("Entry: timeout=%" PRId32 "\n", timeout);
/* 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;
}
@@ -501,7 +502,7 @@ static int sam34_settimeout(FAR struct watchdog_lowerhalf_s *lower,
priv->reload = reload;
- wdinfo("fwdt=%d reload=%d timeout=%d\n",
+ wdinfo("fwdt=%d reload=%" PRId32 " timeout=%" PRId32 "\n",
WDT_FCLK, reload, priv->timeout);
/* Don't commit to MR register until started! */
[incubator-nuttx] 04/27: arch/arm/src/sama5/sam_emacb.c: Fix syslog
formats
Posted by xi...@apache.org.
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 3152ee6c6292e6723ed1d98024b42c899284a014
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Dec 5 22:06:56 2020 +0900
arch/arm/src/sama5/sam_emacb.c: Fix syslog formats
---
arch/arm/src/sama5/sam_emacb.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/arch/arm/src/sama5/sam_emacb.c b/arch/arm/src/sama5/sam_emacb.c
index f482817..c70b7c5 100644
--- a/arch/arm/src/sama5/sam_emacb.c
+++ b/arch/arm/src/sama5/sam_emacb.c
@@ -65,6 +65,7 @@
# define CONFIG_DEBUG_NET 1
#endif
+#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <time.h>
@@ -1367,7 +1368,7 @@ static int sam_recvframe(struct sam_emac_s *priv)
up_invalidate_dcache((uintptr_t)rxdesc,
(uintptr_t)rxdesc + sizeof(struct emac_rxdesc_s));
- ninfo("rxndx: %d\n", rxndx);
+ ninfo("rxndx: %" PRId32 "\n", rxndx);
while ((rxdesc->addr & EMACRXD_ADDR_OWNER) != 0)
{
@@ -1478,7 +1479,8 @@ static int sam_recvframe(struct sam_emac_s *priv)
/* Frame size from the EMAC */
dev->d_len = (rxdesc->status & EMACRXD_STA_FRLEN_MASK);
- ninfo("packet %d-%d (%d)\n", priv->rxndx, rxndx, dev->d_len);
+ ninfo("packet %d-%" PRId32 " (%d)\n",
+ priv->rxndx, rxndx, dev->d_len);
/* All data have been copied in the application frame buffer,
* release the RX descriptor
@@ -1512,7 +1514,7 @@ static int sam_recvframe(struct sam_emac_s *priv)
ninfo("rxndx: %d d_len: %d\n", priv->rxndx, dev->d_len);
if (pktlen < dev->d_len)
{
- nerr("ERROR: Buffer size %d; frame size %d\n",
+ nerr("ERROR: Buffer size %d; frame size %" PRId32 "\n",
dev->d_len, pktlen);
return -E2BIG;
}
@@ -1872,7 +1874,7 @@ static void sam_interrupt_work(FAR void *arg)
imr = sam_getreg(priv, SAM_EMAC_IMR_OFFSET);
pending = isr & ~(imr | EMAC_INT_UNUSED);
- ninfo("isr: %08x pending: %08x\n", isr, pending);
+ ninfo("isr: %08" PRIx32 " pending: %08" PRIx32 "\n", isr, pending);
/* Check for the completion of a transmission. This should be done before
* checking for received data (because receiving can cause another
@@ -1898,7 +1900,7 @@ static void sam_interrupt_work(FAR void *arg)
clrbits = EMAC_TSR_RLE | sam_txinuse(priv);
sam_txreset(priv);
- nerr("ERROR: Retry Limit Exceeded TSR: %08x\n", tsr);
+ nerr("ERROR: Retry Limit Exceeded TSR: %08" PRIx32 "\n", tsr);
regval = sam_getreg(priv, SAM_EMAC_NCR_OFFSET);
regval |= EMAC_NCR_TXEN;
@@ -1909,7 +1911,7 @@ static void sam_interrupt_work(FAR void *arg)
if ((tsr & EMAC_TSR_COL) != 0)
{
- nerr("ERROR: Collision occurred TSR: %08x\n", tsr);
+ nerr("ERROR: Collision occurred TSR: %08" PRIx32 "\n", tsr);
clrbits |= EMAC_TSR_COL;
}
@@ -1917,7 +1919,8 @@ static void sam_interrupt_work(FAR void *arg)
if ((tsr & EMAC_TSR_TFC) != 0)
{
- nerr("ERROR: Transmit Frame Corruption due to AHB error: %08x\n",
+ nerr("ERROR: Transmit Frame Corruption "
+ "due to AHB error: %08" PRIx32 "\n",
tsr);
clrbits |= EMAC_TSR_TFC;
}
@@ -1933,7 +1936,7 @@ static void sam_interrupt_work(FAR void *arg)
if ((tsr & EMAC_TSR_UND) != 0)
{
- nerr("ERROR: Transmit Underrun TSR: %08x\n", tsr);
+ nerr("ERROR: Transmit Underrun TSR: %08" PRIx32 "\n", tsr);
clrbits |= EMAC_TSR_UND;
}
@@ -1970,7 +1973,7 @@ static void sam_interrupt_work(FAR void *arg)
if ((rsr & EMAC_RSR_RXOVR) != 0)
{
- nerr("ERROR: Receiver overrun RSR: %08x\n", rsr);
+ nerr("ERROR: Receiver overrun RSR: %08" PRIx32 "\n", rsr);
clrbits |= EMAC_RSR_RXOVR;
}
@@ -1987,7 +1990,7 @@ static void sam_interrupt_work(FAR void *arg)
if ((rsr & EMAC_RSR_BNA) != 0)
{
- nerr("ERROR: Buffer not available RSR: %08x\n", rsr);
+ nerr("ERROR: Buffer not available RSR: %08" PRIx32 "\n", rsr);
clrbits |= EMAC_RSR_BNA;
}
[incubator-nuttx] 27/27:
boards/arm/s32k1xx/rddrone-uavcan144/src/s32k1xx_bringup.c: Fix syslog
formats
Posted by xi...@apache.org.
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 faa23102fefaa77995c8733f453d6e19886a0de3
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Dec 6 20:34:29 2020 +0900
boards/arm/s32k1xx/rddrone-uavcan144/src/s32k1xx_bringup.c: Fix syslog formats
---
boards/arm/s32k1xx/rddrone-uavcan144/src/s32k1xx_bringup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/boards/arm/s32k1xx/rddrone-uavcan144/src/s32k1xx_bringup.c b/boards/arm/s32k1xx/rddrone-uavcan144/src/s32k1xx_bringup.c
index 0a8d6da..f6c137a 100644
--- a/boards/arm/s32k1xx/rddrone-uavcan144/src/s32k1xx_bringup.c
+++ b/boards/arm/s32k1xx/rddrone-uavcan144/src/s32k1xx_bringup.c
@@ -133,14 +133,14 @@ int s32k1xx_bringup(void)
if (i2c == NULL)
{
- serr("ERROR: Failed to get I2C%d interface\n", bus);
+ serr("ERROR: Failed to get I2C interface\n");
}
else
{
ret = i2c_register(i2c, 0);
if (ret < 0)
{
- serr("ERROR: Failed to register I2C%d driver: %d\n", bus, ret);
+ serr("ERROR: Failed to register I2C driver: %d\n", ret);
s32k1xx_i2cbus_uninitialize(i2c);
}
}
[incubator-nuttx] 25/27:
boards/arm/s32k1xx/rddrone-uavcan146/src/s32k1xx_bringup.c: Fix syslog
formats
Posted by xi...@apache.org.
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 60795464ef07e51582433408b1b9c9e10b5873bd
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Dec 6 19:03:10 2020 +0900
boards/arm/s32k1xx/rddrone-uavcan146/src/s32k1xx_bringup.c: Fix syslog formats
---
boards/arm/s32k1xx/rddrone-uavcan146/src/s32k1xx_bringup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/boards/arm/s32k1xx/rddrone-uavcan146/src/s32k1xx_bringup.c b/boards/arm/s32k1xx/rddrone-uavcan146/src/s32k1xx_bringup.c
index 5dfb50a..47cdb36 100644
--- a/boards/arm/s32k1xx/rddrone-uavcan146/src/s32k1xx_bringup.c
+++ b/boards/arm/s32k1xx/rddrone-uavcan146/src/s32k1xx_bringup.c
@@ -130,14 +130,14 @@ int s32k1xx_bringup(void)
if (i2c == NULL)
{
- serr("ERROR: Failed to get I2C%d interface\n", bus);
+ serr("ERROR: Failed to get I2C interface\n");
}
else
{
ret = i2c_register(i2c, 0);
if (ret < 0)
{
- serr("ERROR: Failed to register I2C%d driver: %d\n", bus, ret);
+ serr("ERROR: Failed to register I2C driver: %d\n", ret);
s32k1xx_i2cbus_uninitialize(i2c);
}
}
[incubator-nuttx] 12/27: arch/arm/src/sam34/sam_hsmci.c: Fix syslog
formats
Posted by xi...@apache.org.
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 8eb0712dec7e3045488a0156afed32bb98787340
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Dec 5 22:40:27 2020 +0900
arch/arm/src/sam34/sam_hsmci.c: Fix syslog formats
---
arch/arm/src/sam34/sam_hsmci.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/arch/arm/src/sam34/sam_hsmci.c b/arch/arm/src/sam34/sam_hsmci.c
index c68d7b6..ca6a7bb 100644
--- a/arch/arm/src/sam34/sam_hsmci.c
+++ b/arch/arm/src/sam34/sam_hsmci.c
@@ -24,6 +24,7 @@
#include <nuttx/config.h>
+#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
@@ -1295,7 +1296,7 @@ static int sam_interrupt(int irq, void *context, FAR void *arg)
{
/* Yes.. Was it some kind of timeout error? */
- mcerr("ERROR: enabled: %08x pending: %08x\n",
+ mcerr("ERROR: enabled: %08" PRIx32 " pending: %08" PRIx32 "\n",
enabled, pending);
if ((pending & HSMCI_DATA_TIMEOUT_ERRORS) != 0)
@@ -1342,7 +1343,7 @@ static int sam_interrupt(int irq, void *context, FAR void *arg)
{
/* Yes.. Was the error some kind of timeout? */
- mcerr("ERROR: events: %08x SR: %08x\n",
+ mcerr("ERROR: events: %08" PRIx32 " SR: %08" PRIx32 "\n",
priv->cmdrmask, enabled);
if ((pending & HSMCI_RESPONSE_TIMEOUT_ERRORS) != 0)
@@ -1797,7 +1798,8 @@ static int sam_sendcmd(FAR struct sdio_dev_s *dev,
/* Write the fully decorated command to CMDR */
- mcinfo("cmd: %08x arg: %08x regval: %08x\n", cmd, arg, regval);
+ mcinfo("cmd: %08" PRIx32 " arg: %08" PRIx32 " regval: %08" PRIx32 "\n",
+ cmd, arg, regval);
putreg32(regval, SAM_HSMCI_CMDR);
sam_cmdsample1(SAMPLENDX_AFTER_CMDR);
return OK;
@@ -1979,7 +1981,8 @@ static int sam_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd)
{
/* Yes.. Was the error some kind of timeout? */
- mcerr("ERROR: cmd: %08x events: %08x SR: %08x\n",
+ mcerr("ERROR: cmd: %08" PRIx32 " events: %08" PRIx32
+ " SR: %08" PRIx32 "\n",
cmd, priv->cmdrmask, sr);
if ((pending & HSMCI_RESPONSE_TIMEOUT_ERRORS) != 0)
@@ -2011,8 +2014,9 @@ static int sam_waitresponse(FAR struct sdio_dev_s *dev, uint32_t cmd)
}
else if (--timeout <= 0)
{
- mcerr("ERROR: Timeout cmd: %08x events: %08x SR: %08x\n",
- cmd, priv->cmdrmask, sr);
+ mcerr("ERROR: Timeout cmd: %08" PRIx32 " events: %08" PRIx32
+ " SR: %08" PRIx32 "\n",
+ cmd, priv->cmdrmask, sr);
priv->wkupevent = SDIOWAIT_TIMEOUT;
return -ETIMEDOUT;
@@ -2512,7 +2516,7 @@ static int sam_dmarecvsetup(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer,
#ifdef CONFIG_SAM34_PDCA
modifyreg32(SAM_HSMCI_MR, 0, HSMCI_MR_PDCMODE);
- mcinfo("SAM_HSMCI_MR = 0x%08X\n", getreg32(SAM_HSMCI_MR));
+ mcinfo("SAM_HSMCI_MR = 0x%08" PRIX32 "\n", getreg32(SAM_HSMCI_MR));
putreg32((uint32_t)buffer, SAM_HSMCI_PDC_RPR);
putreg32(buflen / 4, SAM_HSMCI_PDC_RCR);
@@ -2582,7 +2586,7 @@ static int sam_dmasendsetup(FAR struct sdio_dev_s *dev,
#ifdef CONFIG_SAM34_PDCA
modifyreg32(SAM_HSMCI_MR, 0, HSMCI_MR_PDCMODE);
- mcinfo("SAM_HSMCI_MR = 0x%08X\n", getreg32(SAM_HSMCI_MR));
+ mcinfo("SAM_HSMCI_MR = 0x%08" PRIX32 "\n", getreg32(SAM_HSMCI_MR));
putreg32((uint32_t)buffer, SAM_HSMCI_PDC_TPR);
putreg32(buflen / 4, SAM_HSMCI_PDC_TCR);
[incubator-nuttx] 03/27: arch/arm/src/sama5/sam_xdmac.c: Fix syslog
formats
Posted by xi...@apache.org.
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 c3bcf80a18f9a3b8a4d7f8e24cdc1bcff3a814a7
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Dec 5 22:04:02 2020 +0900
arch/arm/src/sama5/sam_xdmac.c: Fix syslog formats
---
arch/arm/src/sama5/sam_xdmac.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/src/sama5/sam_xdmac.c b/arch/arm/src/sama5/sam_xdmac.c
index 37c0a4c..1134bbb 100644
--- a/arch/arm/src/sama5/sam_xdmac.c
+++ b/arch/arm/src/sama5/sam_xdmac.c
@@ -39,6 +39,7 @@
#include <nuttx/config.h>
+#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
@@ -1850,7 +1851,7 @@ static int sam_xdmac_interrupt(int irq, void *context, FAR void *arg)
{
/* Yes... Terminate the transfer with an error? */
- dmaerr("ERROR: DMA failed: %08x\n", chpending);
+ dmaerr("ERROR: DMA failed: %08" PRIx32 "\n", chpending);
sam_dmaterminate(xdmach, -EIO);
}
@@ -1867,7 +1868,8 @@ static int sam_xdmac_interrupt(int irq, void *context, FAR void *arg)
else
{
- dmaerr("ERROR: Unexpected interrupt: %08x\n", chpending);
+ dmaerr("ERROR: Unexpected interrupt: %08" PRIx32 "\n",
+ chpending);
DEBUGPANIC();
}
[incubator-nuttx] 02/27: arch/arm/src/sama5/sam_xdmac.c: Appease
nxstyle
Posted by xi...@apache.org.
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 c8eb8ac9c1a15376ee9c0872a0121697b8fd3e4c
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Dec 5 22:03:12 2020 +0900
arch/arm/src/sama5/sam_xdmac.c: Appease nxstyle
---
arch/arm/src/sama5/sam_xdmac.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/src/sama5/sam_xdmac.c b/arch/arm/src/sama5/sam_xdmac.c
index 4eb8e3e..37c0a4c 100644
--- a/arch/arm/src/sama5/sam_xdmac.c
+++ b/arch/arm/src/sama5/sam_xdmac.c
@@ -2325,7 +2325,9 @@ int sam_dmastart(DMA_HANDLE handle, dma_callback_t callback, void *arg)
if (xdmach->llhead)
{
- /* Save the callback info. This will be invoked whent the DMA completes */
+ /* Save the callback info. This will be invoked whent the DMA
+ * completes
+ */
xdmach->callback = callback;
xdmach->arg = arg;
[incubator-nuttx] 20/27: arch/arm/src/sam34/sam_emac.c: Fix syslog
formats
Posted by xi...@apache.org.
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 fbf7d7cdf9386a9e0094a9a8b169c798173cb5cf
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Dec 6 18:47:36 2020 +0900
arch/arm/src/sam34/sam_emac.c: Fix syslog formats
---
arch/arm/src/sam34/sam_emac.c | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/arch/arm/src/sam34/sam_emac.c b/arch/arm/src/sam34/sam_emac.c
index b12e85b..1745949 100644
--- a/arch/arm/src/sam34/sam_emac.c
+++ b/arch/arm/src/sam34/sam_emac.c
@@ -50,6 +50,7 @@
#include <nuttx/config.h>
+#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <time.h>
@@ -1018,7 +1019,7 @@ static int sam_recvframe(struct sam_emac_s *priv)
sam_cmcc_invalidate((uintptr_t)rxdesc,
(uintptr_t)rxdesc + sizeof(struct emac_rxdesc_s));
- ninfo("rxndx: %d\n", rxndx);
+ ninfo("rxndx: %" PRId32 "\n", rxndx);
while ((rxdesc->addr & EMACRXD_ADDR_OWNER) != 0)
{
@@ -1115,7 +1116,8 @@ static int sam_recvframe(struct sam_emac_s *priv)
/* Frame size from the EMAC */
dev->d_len = (rxdesc->status & EMACRXD_STA_FRLEN_MASK);
- ninfo("packet %d-%d (%d)\n", priv->rxndx, rxndx, dev->d_len);
+ ninfo("packet %d-%" PRId32 " (%d)\n",
+ priv->rxndx, rxndx, dev->d_len);
/* All data have been copied in the application frame buffer,
* release the RX descriptor
@@ -1144,7 +1146,7 @@ static int sam_recvframe(struct sam_emac_s *priv)
if (pktlen < dev->d_len)
{
- nerr("ERROR: Buffer size %d; frame size %d\n",
+ nerr("ERROR: Buffer size %d; frame size %" PRId32 "\n",
dev->d_len, pktlen);
return -E2BIG;
}
@@ -1471,7 +1473,7 @@ static void sam_interrupt_work(FAR void *arg)
imr = sam_getreg(priv, SAM_EMAC_IMR);
pending = isr & ~(imr | EMAC_INT_UNUSED);
- ninfo("isr: %08x pending: %08x\n", isr, pending);
+ ninfo("isr: %08" PRIx32 " pending: %08" PRIx32 "\n", isr, pending);
/* Check for the completion of a transmission. This should be done before
* checking for received data (because receiving can cause another
@@ -1497,7 +1499,7 @@ static void sam_interrupt_work(FAR void *arg)
clrbits = EMAC_TSR_RLE | sam_txinuse(priv);
sam_txreset(priv);
- nerr("ERROR: Retry Limit Exceeded TSR: %08x\n", tsr);
+ nerr("ERROR: Retry Limit Exceeded TSR: %08" PRIx32 "\n", tsr);
regval = sam_getreg(priv, SAM_EMAC_NCR);
regval |= EMAC_NCR_TXEN;
@@ -1508,7 +1510,7 @@ static void sam_interrupt_work(FAR void *arg)
if ((tsr & EMAC_TSR_COL) != 0)
{
- nerr("ERROR: Collision occurred TSR: %08x\n", tsr);
+ nerr("ERROR: Collision occurred TSR: %08" PRIx32 "\n", tsr);
clrbits |= EMAC_TSR_COL;
}
@@ -1516,7 +1518,8 @@ static void sam_interrupt_work(FAR void *arg)
if ((tsr & EMAC_TSR_TFC) != 0)
{
- nerr("ERROR: Transmit Frame Corruption due to AHB error: %08x\n",
+ nerr("ERROR: Transmit Frame Corruption due to AHB error: "
+ "%08" PRIx32 "\n",
tsr);
clrbits |= EMAC_TSR_TFC;
}
@@ -1532,7 +1535,7 @@ static void sam_interrupt_work(FAR void *arg)
if ((tsr & EMAC_TSR_UND) != 0)
{
- nerr("ERROR: Transmit Underrun TSR: %08x\n", tsr);
+ nerr("ERROR: Transmit Underrun TSR: %08" PRIx32 "\n", tsr);
clrbits |= EMAC_TSR_UND;
}
@@ -1569,7 +1572,7 @@ static void sam_interrupt_work(FAR void *arg)
if ((rsr & EMAC_RSR_RXOVR) != 0)
{
- nerr("ERROR: Receiver overrun RSR: %08x\n", rsr);
+ nerr("ERROR: Receiver overrun RSR: %08" PRIx32 "\n", rsr);
clrbits |= EMAC_RSR_RXOVR;
}
@@ -1586,7 +1589,7 @@ static void sam_interrupt_work(FAR void *arg)
if ((rsr & EMAC_RSR_BNA) != 0)
{
- nerr("ERROR: Buffer not available RSR: %08x\n", rsr);
+ nerr("ERROR: Buffer not available RSR: %08" PRIx32 "\n", rsr);
clrbits |= EMAC_RSR_BNA;
}
@@ -1844,8 +1847,10 @@ static int sam_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));
/* Configure the EMAC interface for normal operation. */
[incubator-nuttx] 24/27: arch/arm/src/s32k1xx/s32k1xx_lpspi.c: Fix
a syslog format
Posted by xi...@apache.org.
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 1c7bdcea983ce0ab5640b9153c3e78040d68e4ca
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Dec 6 18:58:55 2020 +0900
arch/arm/src/s32k1xx/s32k1xx_lpspi.c: Fix a syslog format
---
arch/arm/src/s32k1xx/s32k1xx_lpspi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/src/s32k1xx/s32k1xx_lpspi.c b/arch/arm/src/s32k1xx/s32k1xx_lpspi.c
index 5ce449d..f50ed6b 100644
--- a/arch/arm/src/s32k1xx/s32k1xx_lpspi.c
+++ b/arch/arm/src/s32k1xx/s32k1xx_lpspi.c
@@ -64,6 +64,7 @@
#include <nuttx/config.h>
#include <sys/types.h>
+#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
@@ -1211,7 +1212,8 @@ static uint32_t s32k1xx_lpspi_send(FAR struct spi_dev_s *dev, uint32_t wd)
regval = s32k1xx_lpspi_getreg32(priv, S32K1XX_LPSPI_SR_OFFSET);
- spiinfo("Sent: %04x Return: %04x Status: %02x\n", wd, ret, regval);
+ spiinfo("Sent: %04" PRIx32 " Return: %04" PRIx32
+ " Status: %02" PRIx32 "\n", wd, ret, regval);
UNUSED(regval);
return ret;
[incubator-nuttx] 22/27: boards/arm/sam34/sam4e-ek/src/sam_at25.c:
Fix a syslog format
Posted by xi...@apache.org.
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 46974c29bda4091a6c95a80dc34c6e78311c0998
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Dec 6 18:50:53 2020 +0900
boards/arm/sam34/sam4e-ek/src/sam_at25.c: Fix a syslog format
---
boards/arm/sam34/sam4e-ek/src/sam_at25.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/boards/arm/sam34/sam4e-ek/src/sam_at25.c b/boards/arm/sam34/sam4e-ek/src/sam_at25.c
index ac722ea..a13dda3 100644
--- a/boards/arm/sam34/sam4e-ek/src/sam_at25.c
+++ b/boards/arm/sam34/sam4e-ek/src/sam_at25.c
@@ -97,8 +97,7 @@ int sam_at25_automount(int minor)
mtd = at25_initialize(spi);
if (!mtd)
{
- ferr("ERROR: Failed to bind SPI port %d to "
- "the AT25 FLASH driver\n");
+ ferr("ERROR: Failed to bind SPI port to the AT25 FLASH driver\n");
return -ENODEV;
}
[incubator-nuttx] 23/27: arch/arm/src/s32k1xx/s32k1xx_lpi2c.c: Fix
syslog formats
Posted by xi...@apache.org.
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 cba6e69ccf59e914653adce3a50413c475f40961
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Dec 6 18:56:50 2020 +0900
arch/arm/src/s32k1xx/s32k1xx_lpi2c.c: Fix syslog formats
---
arch/arm/src/s32k1xx/s32k1xx_lpi2c.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/src/s32k1xx/s32k1xx_lpi2c.c b/arch/arm/src/s32k1xx/s32k1xx_lpi2c.c
index 2eb9f19..0c9e487 100644
--- a/arch/arm/src/s32k1xx/s32k1xx_lpi2c.c
+++ b/arch/arm/src/s32k1xx/s32k1xx_lpi2c.c
@@ -40,6 +40,7 @@
#include <nuttx/config.h>
#include <sys/types.h>
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
@@ -754,7 +755,7 @@ static inline void
* still pending.
*/
- i2cinfo("Timeout with Status Register: %x\n", regval);
+ i2cinfo("Timeout with Status Register: %" PRIx32 "\n", regval);
}
/****************************************************************************
@@ -1606,7 +1607,7 @@ static int s32k1xx_lpi2c_transfer(FAR struct i2c_master_s *dev,
{
ret = -ETIMEDOUT;
- i2cerr("ERROR: Timed out: MCR: status: 0x%x\n", priv->status);
+ i2cerr("ERROR: Timed out: MCR: status: 0x%" PRIx32 "\n", priv->status);
}
/* Check for error status conditions */
[incubator-nuttx] 09/27:
boards/arm/sama5/sama5d4-ek/src/sam_at25.c: Fix a syslog format
Posted by xi...@apache.org.
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 3599120dbb1120b46b924b14496b9f991de75fec
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Dec 5 22:28:35 2020 +0900
boards/arm/sama5/sama5d4-ek/src/sam_at25.c: Fix a syslog format
---
boards/arm/sama5/sama5d4-ek/src/sam_at25.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boards/arm/sama5/sama5d4-ek/src/sam_at25.c b/boards/arm/sama5/sama5d4-ek/src/sam_at25.c
index eaf4244..7456e5b 100644
--- a/boards/arm/sama5/sama5d4-ek/src/sam_at25.c
+++ b/boards/arm/sama5/sama5d4-ek/src/sam_at25.c
@@ -102,7 +102,7 @@ int sam_at25_automount(int minor)
if (!mtd)
{
ferr("ERROR: Failed to bind SPI port %d "
- "to the AT25 FLASH driver\n");
+ "to the AT25 FLASH driver\n", AT25_PORT);
return -ENODEV;
}
[incubator-nuttx] 21/27: boards/arm/sam34/sam4e-ek/src/sam_at25.c:
Appease nxstyle
Posted by xi...@apache.org.
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 392c2948e559f7fac6f812a9f0284f36a55c2479
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Dec 6 18:50:32 2020 +0900
boards/arm/sam34/sam4e-ek/src/sam_at25.c: Appease nxstyle
---
boards/arm/sam34/sam4e-ek/src/sam_at25.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/boards/arm/sam34/sam4e-ek/src/sam_at25.c b/boards/arm/sam34/sam4e-ek/src/sam_at25.c
index 282aa61..ac722ea 100644
--- a/boards/arm/sam34/sam4e-ek/src/sam_at25.c
+++ b/boards/arm/sam34/sam4e-ek/src/sam_at25.c
@@ -97,7 +97,8 @@ int sam_at25_automount(int minor)
mtd = at25_initialize(spi);
if (!mtd)
{
- ferr("ERROR: Failed to bind SPI port %d to the AT25 FLASH driver\n");
+ ferr("ERROR: Failed to bind SPI port %d to "
+ "the AT25 FLASH driver\n");
return -ENODEV;
}
@@ -132,6 +133,7 @@ int sam_at25_automount(int minor)
return ret;
}
#endif
+
/* Now we are initialized */
initialized = true;
[incubator-nuttx] 15/27: drivers/mtd/mtd_onfi.c: Fix syslog formats
Posted by xi...@apache.org.
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 6c269e8360b0c94f5539480ef6fc698b1f8de6f0
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Dec 6 09:31:44 2020 +0900
drivers/mtd/mtd_onfi.c: Fix syslog formats
---
drivers/mtd/mtd_onfi.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/mtd/mtd_onfi.c b/drivers/mtd/mtd_onfi.c
index 14bc282..605bb28 100644
--- a/drivers/mtd/mtd_onfi.c
+++ b/drivers/mtd/mtd_onfi.c
@@ -53,6 +53,7 @@
#include <sys/types.h>
+#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
@@ -357,15 +358,15 @@ int onfi_read(uintptr_t cmdaddr, uintptr_t addraddr, uintptr_t dataaddr,
onfi->model = *(FAR uint8_t *)(parmtab + 49);
finfo("Returning:\n");
- finfo(" manufacturer: 0x%02x\n", onfi->manufacturer);
- finfo(" buswidth: %d\n", onfi->buswidth);
- finfo(" luns: %d\n", onfi->luns);
- finfo(" eccsize: %d\n", onfi->eccsize);
- finfo(" model: 0x%02s\n", onfi->model);
- finfo(" sparesize: %d\n", onfi->sparesize);
- finfo(" pagesperblock: %d\n", onfi->pagesperblock);
- finfo(" blocksperlun: %d\n", onfi->blocksperlun);
- finfo(" pagesize: %d\n", onfi->pagesize);
+ finfo(" manufacturer: 0x%02x\n", onfi->manufacturer);
+ finfo(" buswidth: %d\n", onfi->buswidth);
+ finfo(" luns: %d\n", onfi->luns);
+ finfo(" eccsize: %d\n", onfi->eccsize);
+ finfo(" model: 0x%02x\n", onfi->model);
+ finfo(" sparesize: %d\n", onfi->sparesize);
+ finfo(" pagesperblock: %d\n", onfi->pagesperblock);
+ finfo(" blocksperlun: %d\n", onfi->blocksperlun);
+ finfo(" pagesize: %" PRId32 "\n", onfi->pagesize);
return OK;
}
[incubator-nuttx] 18/27: boards/arm/sam34/sam3u-ek/src/sam_lcd.c:
Appease nxstyle
Posted by xi...@apache.org.
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 c007f70de5ea319b85ce7df05f5143c7d6dfc2ae
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Dec 6 10:03:25 2020 +0900
boards/arm/sam34/sam3u-ek/src/sam_lcd.c: Appease nxstyle
The following nxstyle errrors are intentionally left.
They are a part of a large table, which is not trivial to fix.
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:43:87: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:44:86: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:45:87: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:46:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:47:89: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:48:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:49:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:50:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:51:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:52:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:53:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:54:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:55:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:56:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:57:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:58:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:59:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:60:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:61:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:62:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:63:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:64:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:65:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:66:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:67:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:68:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:69:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:70:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:71:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:72:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:73:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:74:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:75:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:76:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:77:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:78:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:79:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:80:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:81:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:82:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:83:84: error: Long line found
boards/arm/sam34/sam3u-ek/src/sam_lcd.c:84:84: error: Long line found
---
boards/arm/sam34/sam3u-ek/src/sam_lcd.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/boards/arm/sam34/sam3u-ek/src/sam_lcd.c b/boards/arm/sam34/sam3u-ek/src/sam_lcd.c
index 5c557c0..860ef98 100644
--- a/boards/arm/sam34/sam3u-ek/src/sam_lcd.c
+++ b/boards/arm/sam34/sam3u-ek/src/sam_lcd.c
@@ -384,10 +384,10 @@ static const struct fb_videoinfo_s g_videoinfo =
static const struct lcd_planeinfo_s g_planeinfo =
{
- .putrun = sam_putrun, /* Put a run into LCD memory */
- .getrun = sam_getrun, /* Get a run from LCD memory */
- .buffer = (uint8_t*)g_runbuffer, /* Run scratch buffer */
- .bpp = SAM3UEK_BPP, /* Bits-per-pixel */
+ .putrun = sam_putrun, /* Put a run into LCD memory */
+ .getrun = sam_getrun, /* Get a run from LCD memory */
+ .buffer = (uint8_t *)g_runbuffer, /* Run scratch buffer */
+ .bpp = SAM3UEK_BPP, /* Bits-per-pixel */
};
/* This is the standard, NuttX LCD driver object */
@@ -602,7 +602,7 @@ static int sam_putrun(fb_coord_t row, fb_coord_t col,
FAR const uint8_t *buffer,
size_t npixels)
{
- uint16_t *run = (uint16_t*)buffer;
+ uint16_t *run = (uint16_t *)buffer;
unsigned int i;
/* Buffer must be provided and aligned to a 16-bit address boundary */
@@ -651,6 +651,7 @@ static int sam_putrun(fb_coord_t row, fb_coord_t col,
sam_wrram(*run++);
}
#endif
+
return OK;
}
@@ -671,7 +672,7 @@ static int sam_putrun(fb_coord_t row, fb_coord_t col,
static int sam_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
size_t npixels)
{
- uint16_t *run = (uint16_t*)buffer;
+ uint16_t *run = (uint16_t *)buffer;
unsigned int i;
/* Buffer must be provided and aligned to a 16-bit address boundary */
@@ -715,6 +716,7 @@ static int sam_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
*run++ = sam_rdram();
}
#endif
+
return OK;
}
[incubator-nuttx] 26/27: arch/arm/src/s32k1xx/s32k1xx_flexcan.c:
Fix syslog formats
Posted by xi...@apache.org.
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 a600b2478deaf614e0069dd255205bed02f0e336
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Dec 6 19:08:21 2020 +0900
arch/arm/src/s32k1xx/s32k1xx_flexcan.c: Fix syslog formats
---
arch/arm/src/s32k1xx/s32k1xx_flexcan.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/arm/src/s32k1xx/s32k1xx_flexcan.c b/arch/arm/src/s32k1xx/s32k1xx_flexcan.c
index 8d28042..c7f6aef 100644
--- a/arch/arm/src/s32k1xx/s32k1xx_flexcan.c
+++ b/arch/arm/src/s32k1xx/s32k1xx_flexcan.c
@@ -24,6 +24,7 @@
#include <nuttx/config.h>
+#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
@@ -637,7 +638,7 @@ static int s32k1xx_transmit(FAR struct s32k1xx_driver_s *priv)
if (mbi == TXMBCOUNT)
{
- nwarn("No TX MB available mbi %i\r\n", mbi);
+ nwarn("No TX MB available mbi %" PRIi32 "\r\n", mbi);
return 0; /* No transmission for you! */
}
@@ -1597,7 +1598,7 @@ static int s32k1xx_initialize(struct s32k1xx_driver_s *priv)
for (i = 0; i < RXMBCOUNT; i++)
{
- ninfo("Set MB%i to receive %p\r\n", i, &priv->rx[i]);
+ ninfo("Set MB%" PRIi32 " to receive %p\r\n", i, &priv->rx[i]);
priv->rx[i].cs.edl = 0x1;
priv->rx[i].cs.brs = 0x1;
priv->rx[i].cs.esi = 0x0;
@@ -1661,8 +1662,8 @@ static void s32k1xx_reset(struct s32k1xx_driver_s *priv)
for (i = 0; i < TOTALMBCOUNT; i++)
{
- ninfo("MB %i %p\r\n", i, &priv->rx[i]);
- ninfo("MB %i %p\r\n", i, &priv->rx[i].id.w);
+ ninfo("MB %" PRIi32 " %p\r\n", i, &priv->rx[i]);
+ ninfo("MB %" PRIi32 " %p\r\n", i, &priv->rx[i].id.w);
priv->rx[i].cs.cs = 0x0;
priv->rx[i].id.w = 0x0;
priv->rx[i].data[0].w00 = 0x0;
[incubator-nuttx] 07/27: arch/arm/src/armv7-a/arm_syscall.c: Fix
syslog formats
Posted by xi...@apache.org.
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 83b24f03821a606a5c983f52e0cecc1703ba9c77
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Dec 5 22:26:18 2020 +0900
arch/arm/src/armv7-a/arm_syscall.c: Fix syslog formats
---
arch/arm/src/armv7-a/arm_syscall.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/arch/arm/src/armv7-a/arm_syscall.c b/arch/arm/src/armv7-a/arm_syscall.c
index 9888888..23921a4 100644
--- a/arch/arm/src/armv7-a/arm_syscall.c
+++ b/arch/arm/src/armv7-a/arm_syscall.c
@@ -24,6 +24,7 @@
#include <nuttx/config.h>
+#include <inttypes.h>
#include <stdint.h>
#include <string.h>
#include <syscall.h>
@@ -142,14 +143,16 @@ uint32_t *arm_syscall(uint32_t *regs)
* and R1..R7 = variable number of arguments depending on the system call.
*/
- svcinfo("SYSCALL Entry: regs: %p cmd: %d\n", regs, cmd);
- svcinfo(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ svcinfo("SYSCALL Entry: regs: %p cmd: %" PRId32 "\n", regs, cmd);
+ svcinfo(" R0: %08" PRIx32 " %08" PRIx32 " %08" PRIx32 " %08" PRIx32
+ " %08" PRIx32 " %08" PRIx32 " %08" PRIx32 " %08" PRIx32 "\n",
regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3],
regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]);
- svcinfo(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ svcinfo(" R8: %08" PRIx32 " %08" PRIx32 " %08" PRIx32 " %08" PRIx32
+ " %08" PRIx32 " %08" PRIx32 " %08" PRIx32 " %08" PRIx32 "\n",
regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11],
regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]);
- svcinfo("CPSR: %08x\n", regs[REG_CPSR]);
+ svcinfo("CPSR: %08" PRIx32 "\n", regs[REG_CPSR]);
/* Handle the SVCall according to the command in R0 */
@@ -479,13 +482,15 @@ uint32_t *arm_syscall(uint32_t *regs)
/* Report what happened */
svcinfo("SYSCALL Exit: regs: %p\n", regs);
- svcinfo(" R0: %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ svcinfo(" R0: %" PRIx32 " %" PRIx32 " %" PRIx32 " %" PRIx32
+ " %" PRIx32 " %" PRIx32 " %" PRIx32 " %" PRIx32 "\n",
regs[REG_R0], regs[REG_R1], regs[REG_R2], regs[REG_R3],
regs[REG_R4], regs[REG_R5], regs[REG_R6], regs[REG_R7]);
- svcinfo(" R8: %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ svcinfo(" R8: %" PRIx32 " %" PRIx32 " %" PRIx32 " %" PRIx32
+ " %" PRIx32 " %" PRIx32 " %" PRIx32 " %" PRIx32 "\n",
regs[REG_R8], regs[REG_R9], regs[REG_R10], regs[REG_R11],
- regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]);
- svcinfo("CPSR: %08x\n", regs[REG_CPSR]);
+ regs[REG_R12], regs[REG_R13], regs[REG_R14], regs[REG_R15]);
+ svcinfo("CPSR: %08" PRIx32 "\n", regs[REG_CPSR]);
/* Return the last value of curent_regs. This supports context switches
* on return from the exception. That capability is only used with the
[incubator-nuttx] 13/27: arch/arm/src/sam34/sam_wdt.c: Appease
nxstyle
Posted by xi...@apache.org.
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 f22982f7e6d0d667489f16f87059e4b60fa88e91
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Dec 5 22:45:25 2020 +0900
arch/arm/src/sam34/sam_wdt.c: Appease nxstyle
---
arch/arm/src/sam34/sam_wdt.c | 66 +++++++++++++++++++++++++-------------------
1 file changed, 37 insertions(+), 29 deletions(-)
diff --git a/arch/arm/src/sam34/sam_wdt.c b/arch/arm/src/sam34/sam_wdt.c
index ebe428b..5ae0fd0 100644
--- a/arch/arm/src/sam34/sam_wdt.c
+++ b/arch/arm/src/sam34/sam_wdt.c
@@ -59,7 +59,9 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
+
/* Clocking *****************************************************************/
+
/* The minimum frequency of the WWDG clock is:
*
* So the maximum delay (in milliseconds) is then:
@@ -88,6 +90,7 @@
/****************************************************************************
* Private Types
****************************************************************************/
+
/* This structure provides the private representation of the "lower-half"
* driver state structure. This structure must be cast-compatible with the
* well-known watchdog_lowerhalf_s structure.
@@ -96,6 +99,7 @@
struct sam34_lowerhalf_s
{
FAR const struct watchdog_ops_s *ops; /* Lower half operations */
+
xcpt_t handler; /* Current EWI interrupt handler */
uint32_t timeout; /* The actual timeout value */
bool started; /* The timer has been started */
@@ -106,6 +110,7 @@ struct sam34_lowerhalf_s
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
+
/* Register operations ******************************************************/
#ifdef CONFIG_SAM34_WDT_REGDEBUG
@@ -137,6 +142,7 @@ static int sam34_ioctl(FAR struct watchdog_lowerhalf_s *lower, int cmd,
/****************************************************************************
* Private Data
****************************************************************************/
+
/* "Lower half" driver methods */
static const struct watchdog_ops_s g_wdgops =
@@ -177,8 +183,8 @@ static uint32_t sam34_getreg(uint32_t addr)
uint32_t val = getreg32(addr);
- /* Is this the same value that we read from the same register last time? Are
- * we polling the register? If so, suppress some of the output.
+ /* Is this the same value that we read from the same register last time?
+ * Are we polling the register? If so, suppress some of the output.
*/
if (addr == prevaddr && val == preval)
@@ -204,7 +210,7 @@ static uint32_t sam34_getreg(uint32_t addr)
{
/* Yes.. then show how many times the value repeated */
- wdinfo("[repeats %d more times]\n", count-3);
+ wdinfo("[repeats %d more times]\n", count - 3);
}
/* Save the new address, value, and count */
@@ -291,8 +297,8 @@ static int sam34_interrupt(int irq, FAR void *context, FAR void *arg)
* Start the watchdog timer, resetting the time to the current timeout,
*
* Input Parameters:
- * lower - A pointer the publicly visible representation of the "lower-half"
- * driver state structure.
+ * lower - A pointer the publicly visible representation of the
+ * "lower-half" driver state structure.
*
* Returned Value:
* Zero on success; a negated errno value on failure.
@@ -315,14 +321,15 @@ static int sam34_start(FAR struct watchdog_lowerhalf_s *lower)
#if defined(CONFIG_SAM34_JTAG_FULL_ENABLE) || \
defined(CONFIG_SAM34_JTAG_NOJNTRST_ENABLE) || \
defined(CONFIG_SAM34_JTAG_SW_ENABLE)
- {
- mr_val |= (WDT_MR_WDDBGHLT|WDT_MR_WDIDLEHLT);
- }
+ {
+ mr_val |= (WDT_MR_WDDBGHLT | WDT_MR_WDIDLEHLT);
+ }
#endif
/* TODO: WDT_MR_WDFIEN if handler available? WDT_MR_WDRPROC? */
- mr_val |= (WDT_MR_WDD(priv->window) | WDT_MR_WDV(priv->reload) | WDT_MR_WDRSTEN);
+ mr_val |= (WDT_MR_WDD(priv->window) | WDT_MR_WDV(priv->reload) |
+ WDT_MR_WDRSTEN);
sam34_putreg(mr_val, SAM_WDT_MR);
priv->started = true;
return OK;
@@ -335,8 +342,8 @@ static int sam34_start(FAR struct watchdog_lowerhalf_s *lower)
* Stop the watchdog timer
*
* Input Parameters:
- * lower - A pointer the publicly visible representation of the "lower-half"
- * driver state structure.
+ * lower - A pointer the publicly visible representation of the
+ * "lower-half" driver state structure.
*
* Returned Value:
* Zero on success; a negated errno value on failure.
@@ -366,8 +373,8 @@ static int sam34_stop(FAR struct watchdog_lowerhalf_s *lower)
* intervals during normal operation to prevent an MCU reset.
*
* Input Parameters:
- * lower - A pointer the publicly visible representation of the "lower-half"
- * driver state structure.
+ * lower - A pointer the publicly visible representation of the
+ * "lower-half" driver state structure.
*
* Returned Value:
* Zero on success; a negated errno value on failure.
@@ -389,8 +396,8 @@ static int sam34_keepalive(FAR struct watchdog_lowerhalf_s *lower)
* Get the current watchdog timer status
*
* Input Parameters:
- * lower - A pointer the publicly visible representation of the "lower-half"
- * driver state structure.
+ * lower - A pointer the publicly visible representation of the
+ * "lower-half" driver state structure.
* status - The location to return the watchdog status information.
*
* Returned Value:
@@ -425,9 +432,11 @@ static int sam34_getstatus(FAR struct watchdog_lowerhalf_s *lower,
status->timeout = priv->timeout;
/* Get the time remaining until the watchdog expires (in milliseconds) */
+
/* REVISIT: not sure if you can read this... */
- elapsed = ((sam34_getreg(SAM_WDT_MR) & WDT_MR_WDV_MASK) >> WDT_MR_WDV_SHIFT);
+ elapsed = ((sam34_getreg(SAM_WDT_MR) & WDT_MR_WDV_MASK) >>
+ WDT_MR_WDV_SHIFT);
status->timeleft = (priv->timeout * elapsed) / (priv->reload + 1);
@@ -445,8 +454,8 @@ static int sam34_getstatus(FAR struct watchdog_lowerhalf_s *lower,
* Set a new timeout value (and reset the watchdog timer)
*
* Input Parameters:
- * lower - A pointer the publicly visible representation of the "lower-half"
- * driver state structure.
+ * lower - A pointer the publicly visible representation of the
+ * "lower-half" driver state structure.
* timeout - The new timeout value in millisecnds.
*
* Returned Value:
@@ -472,8 +481,7 @@ static int sam34_settimeout(FAR struct watchdog_lowerhalf_s *lower,
return -ERANGE;
}
-
- reload = ((timeout * WDT_FCLK) / 1000) - 1;
+ reload = ((timeout * WDT_FCLK) / 1000) - 1;
/* Make sure that the final reload value is within range */
@@ -510,8 +518,8 @@ static int sam34_settimeout(FAR struct watchdog_lowerhalf_s *lower,
* behavior.
*
* Input Parameters:
- * lower - A pointer the publicly visible representation of the "lower-half"
- * driver state structure.
+ * lower - A pointer the publicly visible representation of the
+ * "lower-half" driver state structure.
* newhandler - The new watchdog expiration function pointer. If this
* function pointer is NULL, then the reset-on-expiration
* behavior is restored,
@@ -542,7 +550,7 @@ static xcpt_t sam34_capture(FAR struct watchdog_lowerhalf_s *lower,
/* Save the new handler */
- priv->handler = handler;
+ priv->handler = handler;
/* Are we attaching or detaching the handler? */
@@ -582,8 +590,8 @@ static xcpt_t sam34_capture(FAR struct watchdog_lowerhalf_s *lower,
* are forwarded to the lower half driver through this method.
*
* Input Parameters:
- * lower - A pointer the publicly visible representation of the "lower-half"
- * driver state structure.
+ * lower - A pointer the publicly visible representation of the
+ * "lower-half" driver state structure.
* cmd - The ioctl command value
* arg - The optional argument that accompanies the 'cmd'. The
* interpretation of this argument depends on the particular
@@ -624,7 +632,8 @@ static int sam34_ioctl(FAR struct watchdog_lowerhalf_s *lower, int cmd,
else if (mintime < priv->timeout)
{
- uint32_t window = (((priv->timeout - mintime) * WDT_FCLK) / 1000) - 1;
+ uint32_t window = (((priv->timeout - mintime) * WDT_FCLK) /
+ 1000) - 1;
DEBUGASSERT(window <= priv->reload);
priv->window = window;
ret = OK;
@@ -642,8 +651,8 @@ static int sam34_ioctl(FAR struct watchdog_lowerhalf_s *lower, int cmd,
* Name: sam_wdtinitialize
*
* Description:
- * Initialize the WDT watchdog timer. The watchdog timer is initialized and
- * registers as 'devpath'.
+ * Initialize the WDT watchdog timer. The watchdog timer is initialized
+ * and registers as 'devpath'.
*
* Input Parameters:
* devpath - The full path to the watchdog. This should be of the form
@@ -700,7 +709,6 @@ void sam_wdtinitialize(FAR const char *devpath)
*/
watchdog_register(devpath, (FAR struct watchdog_lowerhalf_s *)priv);
-
}
#endif /* CONFIG_WDT_DISABLE_ON_RESET */
[incubator-nuttx] 06/27: libs/libc/machine/arm/armv7-a/arch_elf.c:
Fix syslog formats
Posted by xi...@apache.org.
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 0117d2b2f6906b258e4b30af5e906aa996cc98de
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Dec 5 22:23:02 2020 +0900
libs/libc/machine/arm/armv7-a/arch_elf.c: Fix syslog formats
---
libs/libc/machine/arm/armv7-a/arch_elf.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/libs/libc/machine/arm/armv7-a/arch_elf.c b/libs/libc/machine/arm/armv7-a/arch_elf.c
index 73ba3db..8e6210c 100644
--- a/libs/libc/machine/arm/armv7-a/arch_elf.c
+++ b/libs/libc/machine/arm/armv7-a/arch_elf.c
@@ -39,6 +39,7 @@
#include <nuttx/config.h>
+#include <inttypes.h>
#include <stdlib.h>
#include <errno.h>
#include <debug.h>
@@ -102,7 +103,7 @@ bool up_checkarch(FAR const Elf32_Ehdr *ehdr)
if ((ehdr->e_entry & 3) != 0)
{
- berr("ERROR: Entry point is not properly aligned: %08x\n",
+ berr("ERROR: Entry point is not properly aligned: %08" PRIx32 "\n",
ehdr->e_entry);
return false;
}
@@ -164,7 +165,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
case R_ARM_CALL:
case R_ARM_JUMP24:
{
- binfo("Performing PC24 [%d] link "
+ binfo("Performing PC24 [%" PRId32 "] link "
"at addr %08lx [%08lx] to sym '%p' st_value=%08lx\n",
ELF32_R_TYPE(rel->r_info), (long)addr,
(long)(*(uint32_t *)addr),
@@ -180,7 +181,8 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
if (offset & 3 || offset < (int32_t) 0xfe000000 ||
offset >= (int32_t) 0x02000000)
{
- berr("ERROR: PC24 [%d] relocation out of range, offset=%08lx\n",
+ berr("ERROR: PC24 [%" PRId32 "] relocation out of range, "
+ "offset=%08lx\n",
ELF32_R_TYPE(rel->r_info), offset);
return -EINVAL;
@@ -235,7 +237,7 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
case R_ARM_MOVW_ABS_NC:
case R_ARM_MOVT_ABS:
{
- binfo("Performing MOVx_ABS [%d] link "
+ binfo("Performing MOVx_ABS [%" PRId32 "] link "
"at addr=%08lx [%08lx] to sym=%p st_value=%08lx\n",
ELF32_R_TYPE(rel->r_info), (long)addr,
(long)(*(uint32_t *)addr),
@@ -256,7 +258,8 @@ int up_relocate(FAR const Elf32_Rel *rel, FAR const Elf32_Sym *sym,
break;
default:
- berr("ERROR: Unsupported relocation: %d\n", ELF32_R_TYPE(rel->r_info));
+ berr("ERROR: Unsupported relocation: %" PRId32 "\n",
+ ELF32_R_TYPE(rel->r_info));
return -EINVAL;
}
[incubator-nuttx] 19/27: boards/arm/sam34/sam3u-ek/src/sam_lcd.c:
Fix syslog formats
Posted by xi...@apache.org.
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 61579ed140b086a50582b26587e7176783b07da7
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Dec 6 10:07:24 2020 +0900
boards/arm/sam34/sam3u-ek/src/sam_lcd.c: Fix syslog formats
---
boards/arm/sam34/sam3u-ek/src/sam_lcd.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/boards/arm/sam34/sam3u-ek/src/sam_lcd.c b/boards/arm/sam34/sam3u-ek/src/sam_lcd.c
index 860ef98..738704a 100644
--- a/boards/arm/sam34/sam3u-ek/src/sam_lcd.c
+++ b/boards/arm/sam34/sam3u-ek/src/sam_lcd.c
@@ -113,6 +113,7 @@
#include <nuttx/config.h>
#include <sys/types.h>
+#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
@@ -921,7 +922,7 @@ int board_lcd_initialize(void)
/* Enable SMC peripheral clock */
putreg32((1 << SAM_PID_SMC), SAM_PMC_PCER);
- lcdinfo("PMC PCSR: %08x SMC: %08x\n",
+ lcdinfo("PMC PCSR: %08" PRIx32 " SMC: %08x\n",
getreg32(SAM_PMC_PCSR), (1 << SAM_PID_SMC));
/* Configure SMC CS2 */
@@ -949,10 +950,10 @@ int board_lcd_initialize(void)
(SMCCS_MODE_DBW_16BITS);
putreg32(regval, SAM_SMCCS_MODE(2));
- lcdinfo("SMC SETUP[%08x]: %08x PULSE[%08x]: %08x\n",
+ lcdinfo("SMC SETUP[%08x]: %08" PRIx32 " PULSE[%08x]: %08" PRIx32 "\n",
SAM_SMCCS_SETUP(2), getreg32(SAM_SMCCS_SETUP(2)),
SAM_SMCCS_PULSE(2), getreg32(SAM_SMCCS_PULSE(2)));
- lcdinfo(" CYCLE[%08x]: %08x MODE[%08x]: %08x\n",
+ lcdinfo(" CYCLE[%08x]: %08" PRIx32 " MODE[%08x]: %08" PRIx32 "\n",
SAM_SMCCS_CYCLE(2), getreg32(SAM_SMCCS_CYCLE(2)),
SAM_SMCCS_MODE(2), getreg32(SAM_SMCCS_MODE(2)));
[incubator-nuttx] 10/27: drivers/audio/audio_null.c: Fix a syslog
format
Posted by xi...@apache.org.
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 2d78501e9a00e0a39cc2eb80dcaed68e0c364de0
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Dec 5 22:31:08 2020 +0900
drivers/audio/audio_null.c: Fix a syslog format
---
drivers/audio/audio_null.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/audio/audio_null.c b/drivers/audio/audio_null.c
index 47750fa..d153e34 100644
--- a/drivers/audio/audio_null.c
+++ b/drivers/audio/audio_null.c
@@ -769,7 +769,7 @@ static int null_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
FAR struct ap_buffer_info_s *bufinfo;
#endif
- audinfo("cmd=%d arg=%ld\n");
+ audinfo("cmd=%d arg=%ld\n", cmd, arg);
/* Deal with ioctls passed from the upper-half driver */
[incubator-nuttx] 16/27: arch/arm/src/sam34/sam4s_nand.c: Fix
syslog formats
Posted by xi...@apache.org.
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 5461bb2462ce77f52a389b7a8104d7362d047f88
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Dec 6 09:40:31 2020 +0900
arch/arm/src/sam34/sam4s_nand.c: Fix syslog formats
---
arch/arm/src/sam34/sam4s_nand.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/arm/src/sam34/sam4s_nand.c b/arch/arm/src/sam34/sam4s_nand.c
index 6a49f64..f1ad929 100644
--- a/arch/arm/src/sam34/sam4s_nand.c
+++ b/arch/arm/src/sam34/sam4s_nand.c
@@ -26,6 +26,7 @@
#include <nuttx/mtd/nand_config.h>
#include <sys/types.h>
+#include <inttypes.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>
@@ -215,7 +216,7 @@ static inline int nand_tryeraseblock(struct sam_nandcs_s *priv, off_t block)
ret = nand_wait_ready(priv);
if (ret < 0)
{
- ferr("ERROR: Block %d Could not erase: %d\n", block, ret);
+ ferr("ERROR: Block %jd Could not erase: %d\n", (intmax_t)block, ret);
}
return ret;
@@ -373,8 +374,9 @@ static int nand_rawread(struct nand_raw_s *raw, off_t block,
rowaddr = block * nandmodel_pagesperblock(&priv->raw.model) + page;
coladdr = data ? 0 : pagesize;
- fwarn("block=%d page=%d rowaddr=%d coladdr %d data=%p spare=%p\n",
- (int)block, page, rowaddr, coladdr , data, spare);
+ fwarn("block=%jd page=%d rowaddr=%jd coladdr %jd data=%p spare=%p\n",
+ (intmax_t)block, page, (intmax_t)rowaddr, (intmax_t)coladdr,
+ data, spare);
coladdr = (coladdr >> 8) & 0x4 ? coladdr & 0x83f : coladdr;
if (data)
{
@@ -583,7 +585,7 @@ struct mtd_dev_s *sam_nand_initialize(int cs)
mtd = nand_initialize(&priv->raw);
if (!mtd)
{
- ferr("ERROR: CS%d nand_initialize failed %d\n", cs);
+ ferr("ERROR: CS%d nand_initialize failed\n", cs);
return NULL;
}
[incubator-nuttx] 08/27:
boards/arm/sama5/sama5d4-ek/src/sam_at25.c: Appease nxstyle
Posted by xi...@apache.org.
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 b69dbbcbcf4ee359c3ba9e75833893269998c178
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Dec 5 22:28:13 2020 +0900
boards/arm/sama5/sama5d4-ek/src/sam_at25.c: Appease nxstyle
---
boards/arm/sama5/sama5d4-ek/src/sam_at25.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/boards/arm/sama5/sama5d4-ek/src/sam_at25.c b/boards/arm/sama5/sama5d4-ek/src/sam_at25.c
index 4f7ef1a..eaf4244 100644
--- a/boards/arm/sama5/sama5d4-ek/src/sam_at25.c
+++ b/boards/arm/sama5/sama5d4-ek/src/sam_at25.c
@@ -101,7 +101,8 @@ int sam_at25_automount(int minor)
mtd = at25_initialize(spi);
if (!mtd)
{
- ferr("ERROR: Failed to bind SPI port %d to the AT25 FLASH driver\n");
+ ferr("ERROR: Failed to bind SPI port %d "
+ "to the AT25 FLASH driver\n");
return -ENODEV;
}