From 4cd7e33b8da56dd9b530c717904b2a9368d3c1b3 Mon Sep 17 00:00:00 2001 From: Petro Karashchenko Date: Thu, 11 Aug 2022 00:50:57 +0200 Subject: [PATCH] arch/arm/samv7: fix compilation warnings Signed-off-by: Petro Karashchenko --- arch/arm/src/samv7/sam_irq.c | 8 +++++--- arch/arm/src/samv7/sam_spi.c | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/arm/src/samv7/sam_irq.c b/arch/arm/src/samv7/sam_irq.c index 1c91546c58..76d0aa4c7a 100644 --- a/arch/arm/src/samv7/sam_irq.c +++ b/arch/arm/src/samv7/sam_irq.c @@ -24,7 +24,7 @@ #include -#include +#include #include #include @@ -186,7 +186,8 @@ static int sam_nmi(int irq, void *context, void *arg) static int sam_busfault(int irq, void *context, void *arg) { up_irq_save(); - _err("PANIC!!! Bus fault received: %08x\n", getreg32(NVIC_CFAULTS)); + _err("PANIC!!! Bus fault received: %08" PRIx32 "\n", + getreg32(NVIC_CFAULTS)); PANIC(); return 0; } @@ -194,7 +195,8 @@ static int sam_busfault(int irq, void *context, void *arg) static int sam_usagefault(int irq, void *context, void *arg) { up_irq_save(); - _err("PANIC!!! Usage fault received: %08x\n", getreg32(NVIC_CFAULTS)); + _err("PANIC!!! Usage fault received: %08" PRIx32 "\n", + getreg32(NVIC_CFAULTS)); PANIC(); return 0; } diff --git a/arch/arm/src/samv7/sam_spi.c b/arch/arm/src/samv7/sam_spi.c index 64fcbb9fcb..14c32b5235 100644 --- a/arch/arm/src/samv7/sam_spi.c +++ b/arch/arm/src/samv7/sam_spi.c @@ -1123,10 +1123,10 @@ static int spi_setdelay(struct spi_dev_s *dev, uint32_t startdelay, uint32_t regval; unsigned int offset; - spiinfo("cs=%d startdelay=%d\n", spics->cs, startdelay); - spiinfo("cs=%d stopdelay=%d\n", spics->cs, stopdelay); - spiinfo("cs=%d csdelay=%d\n", spics->cs, csdelay); - spiinfo("cs=%d ifdelay=%d\n", spics->cs, ifdelay); + spiinfo("cs=%u startdelay=%" PRIu32 "\n", spics->cs, startdelay); + spiinfo("cs=%u stopdelay=%" PRIu32 "\n", spics->cs, stopdelay); + spiinfo("cs=%u csdelay=%" PRIu32 "\n", spics->cs, csdelay); + spiinfo("cs=%u ifdelay=%" PRIu32 "\n", spics->cs, ifdelay); offset = (unsigned int)g_csroffset[spics->cs];