diff mbox series

[5/5] misc/omap_sdrc: Fix bad printf format specifiers

Message ID 20201126111109.112238-6-alex.chen@huawei.com (mailing list archive)
State New, archived
Headers show
Series hw/misc: Fix some bad printf format specifiers | expand

Commit Message

Alex Chen Nov. 26, 2020, 11:11 a.m. UTC
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>
---
 hw/misc/omap_sdrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/misc/omap_sdrc.c b/hw/misc/omap_sdrc.c
index f2f72f6810..c142fe0882 100644
--- a/hw/misc/omap_sdrc.c
+++ b/hw/misc/omap_sdrc.c
@@ -107,7 +107,7 @@  static void omap_sdrc_write(void *opaque, hwaddr addr,
 
     case 0x10:	/* SDRC_SYSCONFIG */
         if ((value >> 3) != 0x2)
-            fprintf(stderr, "%s: bad SDRAM idle mode %i\n",
+            fprintf(stderr, "%s: bad SDRAM idle mode %u\n",
                     __func__, (unsigned)value >> 3);
         if (value & 2)
             omap_sdrc_reset(s);