From nobody Fri May 3 03:26:39 2024 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=1605535664; cv=none; d=zohomail.com; s=zohoarc; b=L+xwf/MDbUBEvN7eHCAlFt53xttNlgLaBqiZTw761gE/MGAJPQSOjc9U3JZ3ldpr/ZNtwhDCQCux2FyswdTrH3g8v5r5KwJDb713tB1Yh66an8IQ/avA7cBcL1E2gDkV5i5GcuAZb2dqmgcs6CGp483m7nRdJEwyOqy/bYXesqs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605535664; 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=MAbFRue0zqcQSPPUgakvH4Q99MvBwgzvRoLBlOCao48=; b=fOitfJ4LSrKAI5Vtp8xG+xEi8tk2EFikk3SjrtJlFiIWpPJwkv4g8UMbTVJiUM4ynahskKxOIewAEmInHHkA9MDd0tsPeGHN4Q5JUZUBl9Z7zfcsjwjhkeM1JisjSbJst/K9dfc4OutLAHtEdi8gTAzLcGoPd2bp8JTshCIJK00= 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 1605535664718907.044446134576; Mon, 16 Nov 2020 06:07:44 -0800 (PST) Received: from localhost ([::1]:52178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kefAV-00022k-LY for importer@patchew.org; Mon, 16 Nov 2020 09:07:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kef7M-0006dN-Ra; Mon, 16 Nov 2020 09:04:28 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:2795) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kef7E-0004dG-H5; Mon, 16 Nov 2020 09:04:28 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CZW522bP6zkWwS; Mon, 16 Nov 2020 22:03:34 +0800 (CST) Received: from huawei.com (10.175.101.6) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Mon, 16 Nov 2020 22:03:43 +0800 From: Xinhao Zhang To: Subject: [PATCH] hw/core/register.c: Don't use '#' flag of printf format Date: Mon, 16 Nov 2020 22:01:48 +0800 Message-ID: <20201116140148.2850128-1-zhangxinhao1@huawei.com> X-Mailer: git-send-email 2.29.0-rc1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.101.6] 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.190; envelope-from=zhangxinhao1@huawei.com; helo=szxga04-in.huawei.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/16 08:22:57 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_H4=0.001, RCVD_IN_MSPIKE_WL=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, alistair@alistair23.me, dengkai1@huawei.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Fix code style. Don't use '#' flag of printf format ('%#') in format strings, use '0x' prefix instead Signed-off-by: Xinhao Zhang Signed-off-by: Kai Deng Reviewed-by: Alistair Francis --- hw/core/register.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/core/register.c b/hw/core/register.c index 31038bd7cc..7986913130 100644 --- a/hw/core/register.c +++ b/hw/core/register.c @@ -80,7 +80,7 @@ void register_write(RegisterInfo *reg, uint64_t val, uint= 64_t we, =20 if (!ac || !ac->name) { qemu_log_mask(LOG_GUEST_ERROR, "%s: write to undefined device stat= e " - "(written value: %#" PRIx64 ")\n", prefix, val); + "(written value: 0x%" PRIx64 ")\n", prefix, val); return; } =20 @@ -89,14 +89,14 @@ void register_write(RegisterInfo *reg, uint64_t val, ui= nt64_t we, test =3D (old_val ^ val) & ac->rsvd; if (test) { qemu_log_mask(LOG_GUEST_ERROR, "%s: change of value in reserved bi= t" - "fields: %#" PRIx64 ")\n", prefix, test); + "fields: 0x%" PRIx64 ")\n", prefix, test); } =20 test =3D val & ac->unimp; if (test) { qemu_log_mask(LOG_UNIMP, - "%s:%s writing %#" PRIx64 " to unimplemented bits:" \ - " %#" PRIx64 "\n", + "%s:%s writing 0x%" PRIx64 " to unimplemented bits:"= \ + " 0x%" PRIx64 "\n", prefix, reg->access->name, val, ac->unimp); } =20 @@ -112,7 +112,7 @@ void register_write(RegisterInfo *reg, uint64_t val, ui= nt64_t we, } =20 if (debug) { - qemu_log("%s:%s: write of value %#" PRIx64 "\n", prefix, ac->name, + qemu_log("%s:%s: write of value 0x%" PRIx64 "\n", prefix, ac->name, new_val); } =20 @@ -150,7 +150,7 @@ uint64_t register_read(RegisterInfo *reg, uint64_t re, = const char* prefix, } =20 if (debug) { - qemu_log("%s:%s: read of value %#" PRIx64 "\n", prefix, + qemu_log("%s:%s: read of value 0x%" PRIx64 "\n", prefix, ac->name, ret); } =20 @@ -193,7 +193,7 @@ void register_write_memory(void *opaque, hwaddr addr, =20 if (!reg) { qemu_log_mask(LOG_GUEST_ERROR, "%s: write to unimplemented registe= r " \ - "at address: %#" PRIx64 "\n", reg_array->prefix, add= r); + "at address: 0x%" PRIx64 "\n", reg_array->prefix, ad= dr); return; } =20 @@ -222,7 +222,7 @@ uint64_t register_read_memory(void *opaque, hwaddr addr, =20 if (!reg) { qemu_log_mask(LOG_GUEST_ERROR, "%s: read to unimplemented registe= r " \ - "at address: %#" PRIx64 "\n", reg_array->prefix, add= r); + "at address: 0x%" PRIx64 "\n", reg_array->prefix, ad= dr); return 0; } =20 --=20 2.29.0-rc1