From patchwork Sat Nov 30 08:11:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Tuminaro X-Patchwork-Id: 11267863 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E21CC13B6 for ; Sat, 30 Nov 2019 08:14:01 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BCA702075C for ; Sat, 30 Nov 2019 08:14:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YWGLh6B6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BCA702075C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iaxrs-0003YI-LK; Sat, 30 Nov 2019 08:12:40 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iaxrs-0003YD-0v for xen-devel@lists.xenproject.org; Sat, 30 Nov 2019 08:12:40 +0000 X-Inumbo-ID: 2c8458cc-1349-11ea-83b8-bc764e2007e4 Received: from mail-pj1-x1041.google.com (unknown [2607:f8b0:4864:20::1041]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2c8458cc-1349-11ea-83b8-bc764e2007e4; Sat, 30 Nov 2019 08:12:39 +0000 (UTC) Received: by mail-pj1-x1041.google.com with SMTP id y21so14408802pjn.9 for ; Sat, 30 Nov 2019 00:12:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=wLfgnpdGWKio5wC+JlRASPkvtt/gDsqC3rQIKJmNYLQ=; b=YWGLh6B6bhmemXGHUYGwGHilAjbsJcyKYRkQPOA3voTYcTGgdTNcERfIMQwBca1nDL D3vmFEFduk1SyFGbpRuOpLQ9fhmojXibGU2eh1h4bpdUfTJCeEnJxtLis6mkFkvM+u/s jV1WznfrdzFUPeyVmVo3uiUlGY1LIfq0u1MuLHqIIZqNDOd5AhTpEk80XxSh4qSNlzQD Es5mgvZEBz0Bo/29FwOwpGcQ671+9/MtazbxdrzqUYIlg8bTzHMIgGaPsGuK4M7FG9Bn Tw0PEJoAs/DPLkZ5WAyEjAiHJKTSj6UzalF2uBBfKAlvD503S6FK26Gxnq/9SRBqlqX9 HQtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wLfgnpdGWKio5wC+JlRASPkvtt/gDsqC3rQIKJmNYLQ=; b=gxNRut24Uz1vSk9HUTMTYAnr/QbxQgZvFYutGSTjHC9TeezysQBimUAROkn662iqql Przs2JUtFbA/ZzRYOS9w9jqVAYyVxcQEG4ls30TLYuNK0P5PGX+wLukDTLFzMrhAAoxc HRATwVMkjjrOwe17WJugeMhv2g1ksM9fU84gpM4dEtJLp3qF27GHlM0Wdc8Oo66bRVVX uC75F40yfffAoZ5ycChsaMp2InsSPWrB4zqsx66rkcGnrVkjGoDg1LEK9vrj6+PbN0yJ k37R5ic4KdfyQlNLX5mRsfMxJxtIBkzR7jv55dEJ3H3ZX4Tv9EqekQAI8tktgc7xcPhN Pxyg== X-Gm-Message-State: APjAAAU6q6IyFETQg+DLDbQaEWR5qIphTowOMVkKeeIoFoNV7dOnhxgs 5banFM2k+3rQ0kmSkZOB/5KX9tPkEu/xSA== X-Google-Smtp-Source: APXvYqzoW9EEKg/braQnKVyBil/Uc5c9H0h2viQkmFDfMDLnlbE/6OuRrY/WrlB5Z+C3Y4LV8sKh4Q== X-Received: by 2002:a17:90a:bcf:: with SMTP id x15mr24137945pjd.0.1575101558225; Sat, 30 Nov 2019 00:12:38 -0800 (PST) Received: from localhost.localdomain (c-24-5-132-18.hsd1.ca.comcast.net. [24.5.132.18]) by smtp.gmail.com with ESMTPSA id w3sm15996224pfd.161.2019.11.30.00.12.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Nov 2019 00:12:37 -0800 (PST) From: Julian Tuminaro To: xen-devel@lists.xenproject.org Date: Sat, 30 Nov 2019 03:11:18 -0500 Message-Id: <20191130081118.18676-1-julian.tuminaro@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [Xen-devel] [PATCH] Fix the KDD_LOG statements to use appropriate format specifier for printing uint64_t X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Wei Liu , Wei Liu , Tim Deegan , Paul Durrant , Jenish Rakholiya , Ian Jackson MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Previous commit in kdd.c had a small issue which lead to warning/error while compiling on 32-bit systems due to mismatch of type size while doing type cast from uint64_t to void * Signed-off-by: Jenish Rakholiya Signed-off-by: Julian Tuminaro Acked-by: Tim Deegan --- tools/debugger/kdd/kdd.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/debugger/kdd/kdd.c b/tools/debugger/kdd/kdd.c index 6d3febefda..3ebda9b12c 100644 --- a/tools/debugger/kdd/kdd.c +++ b/tools/debugger/kdd/kdd.c @@ -613,7 +613,7 @@ static void get_os_info_64(kdd_state *s) idt0_addr |= ((buf >> 32) & 0xffff0000); idt0_addr |= (buf & 0xffff); - KDD_LOG(s, "idt0 addr: %p\n", (void *)idt0_addr); + KDD_LOG(s, "idt0 addr: 0x%"PRIx64"\n", idt0_addr); /* * get the page start and look for "MZ" file header - we limit the search @@ -621,7 +621,6 @@ static void get_os_info_64(kdd_state *s) */ base = idt0_addr & ~(PAGE_SIZE - 1); - KDD_LOG(s, "%p\n", (void *)base); while (search_limit) { uint16_t val; @@ -638,7 +637,7 @@ static void get_os_info_64(kdd_state *s) search_limit -= 1; } - KDD_LOG(s, "base: %p\n", (void *)base); + KDD_LOG(s, "base: 0x%"PRIx64"\n", base); /* found the data section start */ if (get_pe64_sections(s, base, ".data", &data_base, &data_size)) @@ -689,9 +688,9 @@ static void get_os_info_64(kdd_state *s) if (caddr < data_base + data_size) { /* if found, set the field and return */ - KDD_LOG(s, "base: %p\n", (void *)base); - KDD_LOG(s, "modules list: %p\n", (void *)modptr); - KDD_LOG(s, "kddl: %p\n", (void *)kddl); + KDD_LOG(s, "base: 0x%"PRIx64"\n", base); + KDD_LOG(s, "modules list: 0x%"PRIx64"\n", modptr); + KDD_LOG(s, "kddl: 0x%"PRIx64"\n", kddl); KDD_LOG(s, "minor version: 0x%hx\n", minor); s->os.base = base;