linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Malaterre <malat@debian.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	linuxppc-dev@lists.ozlabs.org,
	Mathieu Malaterre <malat@debian.org>
Subject: [PATCH 02/19] ppc32: change %x into %lx
Date: Fri, 16 Mar 2018 12:02:07 +0100	[thread overview]
Message-ID: <20180316110224.12260-3-malat@debian.org> (raw)
In-Reply-To: <20180316110224.12260-1-malat@debian.org>

  CC      arch/powerpc/xmon/xmon.o
../arch/powerpc/xmon/xmon.c: In function ‘memdiffs’:
../arch/powerpc/xmon/xmon.c:2866:17: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘unsigned char *’ [-Werror=format=]
     printf("%.16x %.2x # %.16x %.2x\n", p1 - 1,
                 ^
../arch/powerpc/xmon/xmon.c:2866:30: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘unsigned char *’ [-Werror=format=]
     printf("%.16x %.2x # %.16x %.2x\n", p1 - 1,
                              ^
cc1: all warnings being treated as errors

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 arch/powerpc/xmon/xmon.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index ee113a6e008c..ee7a8c9a042b 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -1671,7 +1671,7 @@ static void prregs(struct pt_regs *fp)
 	}
 #else
 	for (n = 0; n < 32; ++n) {
-		printf("R%.2d = %.8x%s", n, fp->gpr[n],
+		printf("R%.2d = %.8lx%s", n, fp->gpr[n],
 		       (n & 3) == 3? "\n": "   ");
 		if (n == 12 && !FULL_REGS(fp)) {
 			printf("\n");
@@ -2728,7 +2728,7 @@ generic_inst_dump(unsigned long adr, long count, int praddr,
 		dotted = 0;
 		last_inst = inst;
 		if (praddr)
-			printf(REG"  %.8x", adr, inst);
+			printf(REG"  %.8lx", adr, inst);
 		printf("\t");
 		dump_func(inst, adr);
 		printf("\n");
@@ -2920,13 +2920,13 @@ memzcan(void)
 		if (ok && !ook) {
 			printf("%.8x .. ", a);
 		} else if (!ok && ook)
-			printf("%.8x\n", a - mskip);
+			printf("%.8lx\n", a - mskip);
 		ook = ok;
 		if (a + mskip < a)
 			break;
 	}
 	if (ook)
-		printf("%.8x\n", a - mskip);
+		printf("%.8lx\n", a - mskip);
 }
 
 static void show_task(struct task_struct *tsk)
-- 
2.11.0

  parent reply	other threads:[~2018-03-16 11:02 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-16 11:02 [PATCH 00/19] Start using __printf attribute (single commit series) Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 01/19] xmon: Use __printf markup to silence compiler Mathieu Malaterre
2018-03-17 23:33   ` kbuild test robot
2018-03-18  0:27   ` kbuild test robot
2018-03-25  9:06   ` [PATCH v2] " Mathieu Malaterre
2018-04-24 18:55     ` Mathieu Malaterre
2018-05-25 11:41     ` [v2] " Michael Ellerman
2018-03-16 11:02 ` Mathieu Malaterre [this message]
2018-03-16 11:02 ` [PATCH 03/19] ppc32: Change %.16x into %p Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 04/19] ppc32: change %lx " Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 05/19] ppc32: change %lx into %tx (ptrdiff_t) Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 06/19] ppc64: change %lx into %llx Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 07/19] ppc64: change %ld into %d Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 08/19] ppc64: change %x into %lx Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 09/19] ppc64: change %016lx into %p Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 10/19] ppc64: change %lx " Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 11/19] ppc64: change %lx into %x Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 12/19] ppc64: change %lx into %llx Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 13/19] ppc64: change %llx into %lx Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 14/19] ppc64: change %p into %llx Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 15/19] ppc64: change %d into %ld Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 16/19] ppc64: Change %d into %lu Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 17/19] ppc64: change %d into %llu Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 18/19] ppc64: change %ld into %d Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 19/19] ppc64: Handle %p format in DUMPPTR() function-like macro Mathieu Malaterre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180316110224.12260-3-malat@debian.org \
    --to=malat@debian.org \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).