From patchwork Wed Mar 27 04:26:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 1066437 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44TZht6B6Xz9sR5 for ; Wed, 27 Mar 2019 15:27:10 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Kq7OE5XK"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 44TZht4Q7BzDqMk for ; Wed, 27 Mar 2019 15:27:10 +1100 (AEDT) X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::543; helo=mail-pg1-x543.google.com; envelope-from=joel.stan@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Kq7OE5XK"; dkim-atps=neutral Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 44TZhl6jwXzDqLv for ; Wed, 27 Mar 2019 15:27:01 +1100 (AEDT) Received: by mail-pg1-x543.google.com with SMTP id p6so9313314pgh.9 for ; Tue, 26 Mar 2019 21:27:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=qv6o0JNd0t4qQ/pGWU1pTIEEA27kt5HpPJTWvgdCufQ=; b=Kq7OE5XK6ZeNeI0Y0lnQoOH18ab9n2G1MMCg5Yj8yhCnS7htNLUTFlgs4I++JzfyA1 NL0DGVFOF8KmQnFKcxxNHAMjOEr/86hB0UrSaepE2/E1zakmQ9y/Nxr9/KE7XZ+pmUEU vfT8sWYESm17cCZJOzFUrKmFe5maVIHKnrJW9f8qNcmIVT3U9FiMbwMipkylXi+16KZO bQw/SsQU+OoGV62u493a8dyiYEnBR2TAQEF/8kVcqgECr0ygWXOuMdbpUM2kK26JJj0l nGShEUwqoZcWPHxLeOYG+5N0Wsz08ZGQEKROwSwlkL1B8/HEr4k8dIEe9TkMVCIgIVds hFfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version:content-transfer-encoding; bh=qv6o0JNd0t4qQ/pGWU1pTIEEA27kt5HpPJTWvgdCufQ=; b=SNPCEdEPa8xwJZYfAFwT1iOpbUQnOSIjhWeAPXv6BfLJbFwtKoIH9l8yKkRhYfIWKp ht6a4c0/XU1R1IcohiP8YtpPXNdxdM22zj7WwIso3OUgdmKvpANHa6Ll8mkG5nTxWxgV xo5tAmMa43fsSYJvZOSixjIToh4fz+r4lIsruCK89BNb0oa3sf0Q5mbgjnr83ISxxsFK DATU+vOM9AGkahorklFBwCUxhRFCvZMDstmO7mLU1YCTa6S3lOpJkKi+cEFuE3MaO7CA RWD3tsFDbg04oHwgeEacqBx7z6L+d/r1Ei7G7mIEoast0sLeSePFFLWW6o25UUjjbVMQ SK5w== X-Gm-Message-State: APjAAAVcL+yWDSjS3MM73NFLhhfSqXV53ceC7op0MU0AAZ2IvnwARyng 4lEsJvcmR2pJxW5HyVRMlLC15wr0 X-Google-Smtp-Source: APXvYqzG/tceOdhCGmXq+qzMerX7dOo3LpXyOsx56Zwo/DJB1yaAOWZ7zpa5Rw4CmNZ6Nf5VaI2A6A== X-Received: by 2002:aa7:8a87:: with SMTP id a7mr34346765pfc.252.1553660815980; Tue, 26 Mar 2019 21:26:55 -0700 (PDT) Received: from voyager.jms.id.au ([36.255.48.244]) by smtp.gmail.com with ESMTPSA id k75sm50752207pfj.46.2019.03.26.21.26.53 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Mar 2019 21:26:55 -0700 (PDT) Received: by voyager.jms.id.au (sSMTP sendmail emulation); Wed, 27 Mar 2019 14:56:49 +1030 From: Joel Stanley To: pdbg@lists.ozlabs.org Date: Wed, 27 Mar 2019 14:56:48 +1030 Message-Id: <20190327042648.4424-1-joel@jms.id.au> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Pdbg] [PATCH] p8chip: Fix printf format warnings X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" When building for powerpc64: libpdbg/p8chip.c: In function ‘emulate_sreset’: libpdbg/p8chip.c:493:36: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Werror=format=] printf("emulate sreset old NIA:%llx MSR:%llx\n", old_nia, old_msr); ~~~^ ~~~~~~~ %lx Signed-off-by: Joel Stanley --- libpdbg/p8chip.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c index 062da3993111..5bd790143cbf 100644 --- a/libpdbg/p8chip.c +++ b/libpdbg/p8chip.c @@ -490,8 +490,10 @@ static int emulate_sreset(struct thread *thread) new_msr |= MSR_LE; else new_msr &= ~MSR_LE; - printf("emulate sreset old NIA:%llx MSR:%llx\n", old_nia, old_msr); - printf("emulate sreset new NIA:%llx MSR:%llx\n", new_nia, new_msr); + printf("emulate sreset old NIA:%"PRIx64" MSR:%"PRIx64"\n", + old_nia, old_msr); + printf("emulate sreset new NIA:%"PRIx64" MSR:%"PRIx64"\n", + new_nia, new_msr); CHECK_ERR(ram_putspr(&thread->target, SPR_SRR0, old_nia)); CHECK_ERR(ram_putspr(&thread->target, SPR_SRR1, old_msr)); CHECK_ERR(ram_putnia(&thread->target, new_nia));