From patchwork Mon Jun 25 15:52:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 9605 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 AF50E23F2E for ; Mon, 25 Jun 2012 15:52:33 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id 7EAA4A1834F for ; Mon, 25 Jun 2012 15:52:33 +0000 (UTC) Received: by yenq6 with SMTP id q6so3202623yen.11 for ; Mon, 25 Jun 2012 08:52:33 -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=xeLKH+0GpzQy+cGSj6v14dn0oEgSwTCuazn/8xDwWM0=; b=TMKUZMIXJFN/gPtLHs5WZbGRdm5OqS4+SInsHcdXXcmGIuui026ONZvYKo0C+gaiaV RO6RTsICUY2twqoNLpZp8ZfHPbNe9/g+p9D9gU8Dm7+19Ee8Kyxp2poSqldsLEIGLtYK JjNKW+dxEsEKy6GFIb0TBLJPzPU6a1ph8abEq8NgQkNwPYzGAaKwImXbpM2Xj/tkEPhD 2kQErH8w/I267w+ZV9zf7L8JpDSJ719pPyQ6C0lVNGG/F5/kTHhZYObI+yHRxQNclgTm hfvLe0ld4ao7hhItbNoK4ZzUHFNM6B+JCAcS30WgzU5TmDvj+A93AFI6RfyHsxBZkeaR l68A== Received: by 10.50.163.99 with SMTP id yh3mr8473749igb.53.1340639552825; Mon, 25 Jun 2012 08:52:32 -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 v20csp51986ibb; Mon, 25 Jun 2012 08:52:30 -0700 (PDT) Received: by 10.180.82.198 with SMTP id k6mr25990506wiy.20.1340639550466; Mon, 25 Jun 2012 08:52:30 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id m21si16720109wee.8.2012.06.25.08.52.29 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Jun 2012 08:52:30 -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 1SjBaS-0006uH-DE; Mon, 25 Jun 2012 16:52:24 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Anthony Liguori , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Eric Blake Subject: [PATCH v2 3/4] hw/sh_serial: Use TARGET_PRIxPHYS rather than %x for physaddr Date: Mon, 25 Jun 2012 16:52:23 +0100 Message-Id: <1340639544-26520-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1340639544-26520-1-git-send-email-peter.maydell@linaro.org> References: <1340639544-26520-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQlWHpNzCc+ONVz4EXurK0lz0pZk+3jpeHoe6Ao36vv9yFRAwAapMhBH1LPkOAg8Zhpphx0g Switch a format string from %x to TARGET_PRIxPHYS 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 Reviewed-by: Andreas Färber --- hw/sh_serial.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/sh_serial.c b/hw/sh_serial.c index 43b0eb1..1d1883d 100644 --- a/hw/sh_serial.c +++ b/hw/sh_serial.c @@ -186,7 +186,8 @@ 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" + TARGET_PRIxPHYS "\n", offs); abort(); } @@ -287,7 +288,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" + TARGET_PRIxPHYS "\n", offs); abort(); }