[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/16] ssi: Fix bad printf format specifiers
From: |
Peter Maydell |
Subject: |
[PULL 02/16] ssi: Fix bad printf format specifiers |
Date: |
Tue, 10 Nov 2020 11:19:03 +0000 |
From: AlexChen <alex.chen@huawei.com>
We should use printf format specifier "%u" instead of "%d" for
argument of type "unsigned int".
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Alex Chen <alex.chen@huawei.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 5FA280F5.8060902@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/ssi/imx_spi.c | 2 +-
hw/ssi/xilinx_spi.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/ssi/imx_spi.c b/hw/ssi/imx_spi.c
index 7f703d8328d..d8885ae454e 100644
--- a/hw/ssi/imx_spi.c
+++ b/hw/ssi/imx_spi.c
@@ -53,7 +53,7 @@ static const char *imx_spi_reg_name(uint32_t reg)
case ECSPI_MSGDATA:
return "ECSPI_MSGDATA";
default:
- sprintf(unknown, "%d ?", reg);
+ sprintf(unknown, "%u ?", reg);
return unknown;
}
}
diff --git a/hw/ssi/xilinx_spi.c b/hw/ssi/xilinx_spi.c
index fec8817d946..49ff2755935 100644
--- a/hw/ssi/xilinx_spi.c
+++ b/hw/ssi/xilinx_spi.c
@@ -142,7 +142,7 @@ static void xlx_spi_update_irq(XilinxSPI *s)
irq chain unless things really changed. */
if (pending != s->irqline) {
s->irqline = pending;
- DB_PRINT("irq_change of state %d ISR:%x IER:%X\n",
+ DB_PRINT("irq_change of state %u ISR:%x IER:%X\n",
pending, s->regs[R_IPISR], s->regs[R_IPIER]);
qemu_set_irq(s->irq, pending);
}
--
2.20.1
- [PULL 00/16] target-arm queue, Peter Maydell, 2020/11/10
- [PULL 01/16] hw/arm/Kconfig: ARM_V7M depends on PTIMER, Peter Maydell, 2020/11/10
- [PULL 04/16] target/arm: Don't use '#' flag of printf format, Peter Maydell, 2020/11/10
- [PULL 03/16] target/arm: add spaces around operator, Peter Maydell, 2020/11/10
- [PULL 02/16] ssi: Fix bad printf format specifiers,
Peter Maydell <=
- [PULL 05/16] target/arm: add space before the open parenthesis '(', Peter Maydell, 2020/11/10
- [PULL 06/16] docs: add some notes on the sbsa-ref machine, Peter Maydell, 2020/11/10
- [PULL 07/16] hw/arm/virt: Remove dependency on Cortex-A15 MPCore peripherals, Peter Maydell, 2020/11/10
- [PULL 08/16] target/arm: Fix neon VTBL/VTBX for len > 1, Peter Maydell, 2020/11/10
- [PULL 10/16] hw/misc/stm32f2xx_syscfg: Remove extraneous IRQ, Peter Maydell, 2020/11/10
- [PULL 11/16] hw/arm/nseries: Remove invalid/unnecessary n8x0_uart_setup(), Peter Maydell, 2020/11/10
- [PULL 09/16] hw/arm/armsse: Correct expansion MPC interrupt lines, Peter Maydell, 2020/11/10
- [PULL 14/16] hw/arm/nseries: Check return value from load_image_targphys(), Peter Maydell, 2020/11/10
- [PULL 13/16] hw/arm/musicpal: Only use qdev_get_gpio_in() when necessary, Peter Maydell, 2020/11/10
- [PULL 12/16] hw/arm/musicpal: Don't connect two qemu_irqs directly to the same input, Peter Maydell, 2020/11/10