From patchwork Mon Jun 25 12:45:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 9600 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 27FA023EE2 for ; Mon, 25 Jun 2012 12:45:26 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id EBC49A181C4 for ; Mon, 25 Jun 2012 12:45:25 +0000 (UTC) Received: by ghbz12 with SMTP id z12so2971594ghb.11 for ; Mon, 25 Jun 2012 05:45:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=HwYABpyEmaVm2azYfghpoa7Mwnyw3nDaHIFqJjI8/po=; b=WM7NzRHAFXPAdvzp3OgTmt0Jm0+6K4EnCgrTwhrPYkLHhPlWVSzv916xDCoF7Egr8e mvAtc//uaYiHCsy2Pvr0M10mQV4oofx3798mbZAMvWTuvf+jkZUz5Xw4/CUp8fhPru9k OuZxn1cN7LBpN2C2FTJHO5fR6dwYod0zbYth+kp+YqbhCQDiijlXXwgUCXvg+MG52eEb 7Rx+yblZ0PnvowmeFgZ+7gvzHRwgCIk30d1qBipB2Wsj/mzI2flTXw8f90/3VgYdbgaV y3TeMglVbeQInSmPOD+Ov6/AIlmWuHtwAprNXjxeKrVS4Ho87cZEWB4dDwftDn9EYYWP iU2w== Received: by 10.50.46.232 with SMTP id y8mr7733538igm.57.1340628325176; Mon, 25 Jun 2012 05:45:25 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp46003ibb; Mon, 25 Jun 2012 05:45:22 -0700 (PDT) Received: by 10.205.128.8 with SMTP id hc8mr4004952bkc.17.1340628322040; Mon, 25 Jun 2012 05:45:22 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id l2si10864030bka.127.2012.06.25.05.45.20 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Jun 2012 05:45:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1Sj8fM-0006qC-Nn; Mon, 25 Jun 2012 13:45:16 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Anthony Liguori , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [PATCH 3/4] hw/sh_serial: Use PRIxPLX rather than %x for physaddr Date: Mon, 25 Jun 2012 13:45:15 +0100 Message-Id: <1340628316-26267-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1340628316-26267-1-git-send-email-peter.maydell@linaro.org> References: <1340628316-26267-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQkIXjHKxubAd+yEdpjR/TelW5ewssVS3+DEU7saCdBp6n10MDkQMdY7jWz44I5wCZ72ex35 Switch a format string from %x to PRIxPLX so that it will continue to work even if target_phys_addr_t is changed to 64 bits in the future. Signed-off-by: Peter Maydell --- hw/sh_serial.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/sh_serial.c b/hw/sh_serial.c index 43b0eb1..6f89696 100644 --- a/hw/sh_serial.c +++ b/hw/sh_serial.c @@ -186,7 +186,7 @@ static void sh_serial_write(void *opaque, target_phys_addr_t offs, } } - fprintf(stderr, "sh_serial: unsupported write to 0x%02x\n", offs); + fprintf(stderr, "sh_serial: unsupported write to 0x%02" PRIxPLX "\n", offs); abort(); } @@ -287,7 +287,8 @@ static uint64_t sh_serial_read(void *opaque, target_phys_addr_t offs, #endif if (ret & ~((1 << 16) - 1)) { - fprintf(stderr, "sh_serial: unsupported read from 0x%02x\n", offs); + fprintf(stderr, + "sh_serial: unsupported read from 0x%02" PRIxPLX "\n", offs); abort(); }