From patchwork Fri Jan 19 14:56:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 10175489 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 175E8601E7 for ; Fri, 19 Jan 2018 14:57:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19119285F1 for ; Fri, 19 Jan 2018 14:57:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0DB6628691; Fri, 19 Jan 2018 14:57:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8AA38285F1 for ; Fri, 19 Jan 2018 14:57:20 +0000 (UTC) Received: from localhost ([::1]:53859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecY6Z-0001qi-FR for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Jan 2018 09:57:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecY5V-0000sa-2T for qemu-devel@nongnu.org; Fri, 19 Jan 2018 09:56:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecY5R-0002nU-3u for qemu-devel@nongnu.org; Fri, 19 Jan 2018 09:56:13 -0500 Received: from mail-qt0-f182.google.com ([209.85.216.182]:46582) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ecY5Q-0002nH-Vr for qemu-devel@nongnu.org; Fri, 19 Jan 2018 09:56:09 -0500 Received: by mail-qt0-f182.google.com with SMTP id o35so4359394qtj.13 for ; Fri, 19 Jan 2018 06:56:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+T4NKDlA4rD59cTySo7lYrMz+wj+PV/RJuVPWeQ1CpI=; b=U0JLRFTWv2mYbngexWhnyA4DcAe9jJG7JotbEWNulWMOUt0HhD4jreGKb3w56kep8d BIWndlU73ceKKJgvW6QzMBWqzTB6clotTmxWIWIZezWn2ZiqmAsPuCJCyqAcm55TO5Md qV6o9KTDDnH/v7ajBvX6KI/FvQ9v0Ezad36ni1n8N5d3ROjZLIvSsdDP8u5OcIf2Cu8N gYs69Gsge1ndX6UFlD2a1EUB4s2od7u0IUk+/AVBoSfkjPssUz57A/S3JExH0doQr+dA Au4FHbr9ThaFgMMKVioq0bv/NEJv1q0yiurw/yThM+FbI95zi8EScAWDB3qFiIcBwOAE v04w== X-Gm-Message-State: AKwxytcwLKmqDtHsayBYKfyr4euyt9ScxbrqVhuTT7a+G7y0JFQcqpoW Ruo4d5Sh/a5JPDNPowZFS2F8nuvMy/CVEGGF/tSsND8j X-Google-Smtp-Source: ACJfBouuqHqDSHpxePlWElBOT/itZAPiP0Dx3N9zvsd6PBqt4cmM31JcNhh30qaIVKfAPI2c2V9h5ikri3FXG9mS898= X-Received: by 10.200.50.77 with SMTP id y13mr46774209qta.167.1516373768168; Fri, 19 Jan 2018 06:56:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.146.155 with HTTP; Fri, 19 Jan 2018 06:56:07 -0800 (PST) In-Reply-To: <151637257830.599.12053715954868331479@5adcb62bf0d6> References: <20180119141105.29095-1-marcandre.lureau@redhat.com> <151637257830.599.12053715954868331479@5adcb62bf0d6> From: Marc-Andre Lureau Date: Fri, 19 Jan 2018 15:56:07 +0100 Message-ID: To: qemu-devel X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.216.182 Subject: Re: [Qemu-devel] [PATCH v2 0/5] tpm: CRB device and cleanups X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre , famz@redhat.com, stefanb@linux.vnet.ibm.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Jan 19, 2018 at 3:36 PM, wrote: > /tmp/qemu-test/src/hw/tpm/tpm_crb.c: In function 'tpm_crb_mmio_read': > /tmp/qemu-test/src/hw/tpm/tpm_crb.c:126:13: error: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'hwaddr {aka long long unsigned int}' [-Werror=format=] > DPRINTF("CRB read 0x%lx:%s len:%u\n", > ^ > /tmp/qemu-test/src/hw/tpm/tpm_crb.c:48:20: note: in definition of macro 'DPRINTF' > printf(fmt, ## __VA_ARGS__); \ > ^~~ > /tmp/qemu-test/src/hw/tpm/tpm_crb.c: In function 'tpm_crb_mmio_write': > /tmp/qemu-test/src/hw/tpm/tpm_crb.c:146:13: error: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'hwaddr {aka long long unsigned int}' [-Werror=format=] > DPRINTF("CRB write 0x%lx:%s len:%u val:%lu\n", > ^ > /tmp/qemu-test/src/hw/tpm/tpm_crb.c:48:20: note: in definition of macro 'DPRINTF' > printf(fmt, ## __VA_ARGS__); \ > ^~~ > /tmp/qemu-test/src/hw/tpm/tpm_crb.c:146:13: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'uint64_t {aka long long unsigned int}' [-Werror=format=] > DPRINTF("CRB write 0x%lx:%s len:%u val:%lu\n", > ^ > /tmp/qemu-test/src/hw/tpm/tpm_crb.c:48:20: note: in definition of macro 'DPRINTF' > printf(fmt, ## __VA_ARGS__); \ > ^~~ This will fix it: Stefan feel free to squash it if no further changes required --- a/hw/tpm/tpm_crb.c +++ b/hw/tpm/tpm_crb.c @@ -123,7 +123,7 @@ static uint64_t tpm_crb_mmio_read(void *opaque, hwaddr addr, unsigned size) { CRBState *s = CRB(opaque); - DPRINTF("CRB read 0x%lx:%s len:%u\n", + DPRINTF("CRB read 0x" TARGET_FMT_plx ":%s len:%u\n", addr, addr_desc(addr), size); void *regs = (void *)&s->regs + addr; @@ -143,7 +143,7 @@ static void tpm_crb_mmio_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { CRBState *s = CRB(opaque); - DPRINTF("CRB write 0x%lx:%s len:%u val:%lu\n", + DPRINTF("CRB write 0x" TARGET_FMT_plx ":%s len:%u val:%" PRIu64 "\n", addr, addr_desc(addr), size, val); switch (addr) {