aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/imx_ccm.c
diff options
context:
space:
mode:
authorAlex Chen <alex.chen@huawei.com>2020-11-26 11:11:06 +0000
committerPeter Maydell <peter.maydell@linaro.org>2020-12-10 11:44:55 +0000
commita88ae037572f23a54cf865e7a07df2d734288927 (patch)
treea6904b3b5119bf512053098b3431cb98067630c4 /hw/misc/imx_ccm.c
parent26c69099f762d53731fb3268db990f3e65dc3d1e (diff)
downloadqemu-a88ae037572f23a54cf865e7a07df2d734288927.zip
qemu-a88ae037572f23a54cf865e7a07df2d734288927.tar.gz
qemu-a88ae037572f23a54cf865e7a07df2d734288927.tar.bz2
i.MX31: Fix bad printf format specifiers
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> Message-id: 20201126111109.112238-3-alex.chen@huawei.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/misc/imx_ccm.c')
-rw-r--r--hw/misc/imx_ccm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/misc/imx_ccm.c b/hw/misc/imx_ccm.c
index 5288207..08a50ee 100644
--- a/hw/misc/imx_ccm.c
+++ b/hw/misc/imx_ccm.c
@@ -38,7 +38,7 @@ uint32_t imx_ccm_get_clock_frequency(IMXCCMState *dev, IMXClk clock)
freq = klass->get_clock_frequency(dev, clock);
}
- DPRINTF("(clock = %d) = %d\n", clock, freq);
+ DPRINTF("(clock = %d) = %u\n", clock, freq);
return freq;
}
@@ -65,7 +65,7 @@ uint32_t imx_ccm_calc_pll(uint32_t pllreg, uint32_t base_freq)
freq = ((2 * (base_freq >> 10) * (mfi * mfd + mfn)) /
(mfd * pd)) << 10;
- DPRINTF("(pllreg = 0x%08x, base_freq = %d) = %d\n", pllreg, base_freq,
+ DPRINTF("(pllreg = 0x%08x, base_freq = %u) = %d\n", pllreg, base_freq,
freq);
return freq;