From nobody Mon Nov 17 15:42:39 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1605081118; cv=none; d=zohomail.com; s=zohoarc; b=KU0Z8pmnkNcoTAiC5pUal19+ha9/iuXl1mB4l9FrWn+k642NJPt2BVsfU0S2fviiWztaOPyIi2hTb6JH7B2oGITUAU9bilyBZEbjiyUldiPtSwG49rLEBdTo4pZ53HPIbqtsiuSEPIk95PbAKHBRAxHYI3g4u+gfB7PQT/dN7ww= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605081118; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=hBARSTGiHtWNtcGnOWMV2NbKPAxN6CAeTsn3tuzjoTY=; b=WQ5vgeuK1cu6gJPGlFfYt6mTiGAz+fhsp5WV3GTP07X364rQQHjtJdoJsvlmc3PocOIWURbiSYt/JIDyj7dyY7bIJo6uNAcJfjRG1fhHWgKcDmCeZeX5cqvL9qHzCBP5yTc2WaqiaMsY3clDyoTlfiUDzZSd0iCk3jVpu/N+xUg= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1605081118581967.872285949595; Tue, 10 Nov 2020 23:51:58 -0800 (PST) Received: from localhost ([::1]:39644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kckv6-0005zO-BD for importer@patchew.org; Wed, 11 Nov 2020 02:51:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kckrn-0004L1-DY; Wed, 11 Nov 2020 02:48:31 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:2518) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kckrg-0006tK-TN; Wed, 11 Nov 2020 02:48:31 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CWH073s0SzhkQM; Wed, 11 Nov 2020 15:48:07 +0800 (CST) Received: from huawei.com (10.175.124.27) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Wed, 11 Nov 2020 15:48:08 +0800 From: Alex Chen To: , Subject: [PATCH] exynos: Fix bad printf format specifiers Date: Wed, 11 Nov 2020 07:36:51 +0000 Message-ID: <20201111073651.72804-1-alex.chen@huawei.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.124.27] X-CFilter-Loop: Reflected Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=45.249.212.191; envelope-from=alex.chen@huawei.com; helo=szxga05-in.huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/11 02:48:17 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alex.chen@huawei.com, qemu-trivial@nongnu.org, qemu-arm@nongnu.org, qemu-devel@nongnu.org, zhang.zhanghailiang@huawei.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" We should use printf format specifier "%u" instead of "%d" for argument of type "unsigned int". Reported-by: Euler Robot Signed-off-by: Alex Chen --- hw/timer/exynos4210_mct.c | 4 ++-- hw/timer/exynos4210_pwm.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c index 08ee3ca76c..439053acd2 100644 --- a/hw/timer/exynos4210_mct.c +++ b/hw/timer/exynos4210_mct.c @@ -537,7 +537,7 @@ static void exynos4210_gcomp_raise_irq(void *opaque, ui= nt32_t id) /* If CSTAT is pending and IRQ is enabled */ if ((s->reg.int_cstat & G_INT_CSTAT_COMP(id)) && (s->reg.int_enb & G_INT_ENABLE(id))) { - DPRINTF("gcmp timer[%d] IRQ\n", id); + DPRINTF("gcmp timer[%u] IRQ\n", id); qemu_irq_raise(s->irq[id]); } } @@ -1003,7 +1003,7 @@ static void exynos4210_mct_update_freq(Exynos4210MCTS= tate *s) MCT_CFG_GET_DIVIDER(s->reg_mct_cfg)); =20 if (freq !=3D s->freq) { - DPRINTF("freq=3D%dHz\n", s->freq); + DPRINTF("freq=3D%uHz\n", s->freq); =20 /* global timer */ tx_ptimer_set_freq(s->g_timer.ptimer_frc, s->freq); diff --git a/hw/timer/exynos4210_pwm.c b/hw/timer/exynos4210_pwm.c index 4fa3d87396..de181428b4 100644 --- a/hw/timer/exynos4210_pwm.c +++ b/hw/timer/exynos4210_pwm.c @@ -169,7 +169,7 @@ static void exynos4210_pwm_update_freq(Exynos4210PWMSta= te *s, uint32_t id) =20 if (freq !=3D s->timer[id].freq) { ptimer_set_freq(s->timer[id].ptimer, s->timer[id].freq); - DPRINTF("freq=3D%dHz\n", s->timer[id].freq); + DPRINTF("freq=3D%uHz\n", s->timer[id].freq); } } =20 @@ -183,14 +183,14 @@ static void exynos4210_pwm_tick(void *opaque) uint32_t id =3D s->id; bool cmp; =20 - DPRINTF("timer %d tick\n", id); + DPRINTF("timer %u tick\n", id); =20 /* set irq status */ p->reg_tint_cstat |=3D TINT_CSTAT_STATUS(id); =20 /* raise IRQ */ if (p->reg_tint_cstat & TINT_CSTAT_ENABLE(id)) { - DPRINTF("timer %d IRQ\n", id); + DPRINTF("timer %u IRQ\n", id); qemu_irq_raise(p->timer[id].irq); } =20 @@ -202,7 +202,7 @@ static void exynos4210_pwm_tick(void *opaque) } =20 if (cmp) { - DPRINTF("auto reload timer %d count to %x\n", id, + DPRINTF("auto reload timer %u count to %x\n", id, p->timer[id].reg_tcntb); ptimer_set_count(p->timer[id].ptimer, p->timer[id].reg_tcntb); ptimer_run(p->timer[id].ptimer, 1); --=20 2.19.1