From fdfb2109a2bc66cbc7c1d95581b49ebb2972e965 Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Tue, 26 Feb 2019 10:03:24 -0800 Subject: [PATCH] arch: Use macro BIT for shift operations BIT macro uses an unsigned int avoiding implementation-defined behavior when shifting signed types. MISRA-C rule 10.1 Signed-off-by: Flavio Ceolin --- arch/xtensa/core/fatal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/core/fatal.c b/arch/xtensa/core/fatal.c index 5b078f54342..57845a4e0f5 100644 --- a/arch/xtensa/core/fatal.c +++ b/arch/xtensa/core/fatal.c @@ -198,7 +198,7 @@ XTENSA_ERR_NORET void ReservedInterruptHandler(unsigned int intNo) printk("*** Reserved Interrupt ***\n"); dump_exc_state(); printk("INTENABLE = 0x%x\n" - "INTERRUPT = 0x%x (%d)\n", + "INTERRUPT = 0x%x (%x)\n", get_sreg(INTENABLE), (1 << intNo), intNo); z_NanoFatalErrorHandler(_NANO_ERR_RESERVED_IRQ, &_default_esf); }