All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Andrew Jones <drjones@redhat.com>, kvm@vger.kernel.org
Cc: pbonzini@redhat.com, rkrcmar@redhat.com
Subject: Re: [kvm-unit-tests PATCH 3/4] arm64: fix printf format warnings
Date: Tue, 1 Mar 2016 06:01:33 +0100	[thread overview]
Message-ID: <56D5222D.8010607@redhat.com> (raw)
In-Reply-To: <1456777155-8599-4-git-send-email-drjones@redhat.com>

On 29.02.2016 21:19, Andrew Jones wrote:
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
>  lib/arm64/processor.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/arm64/processor.c b/lib/arm64/processor.c
> index c553390c969ea..deeab4ec9c8ac 100644
> --- a/lib/arm64/processor.c
> +++ b/lib/arm64/processor.c
> @@ -66,12 +66,12 @@ void show_regs(struct pt_regs *regs)
>  {
>  	int i;
>  
> -	printf("pc : [<%016llx>] lr : [<%016llx>] pstate: %08llx\n",
> +	printf("pc : [<%016lx>] lr : [<%016lx>] pstate: %08lx\n",
>  			regs->pc, regs->regs[30], regs->pstate);
> -	printf("sp : %016llx\n", regs->sp);
> +	printf("sp : %016lx\n", regs->sp);
>  
>  	for (i = 29; i >= 0; --i) {
> -		printf("x%-2d: %016llx ", i, regs->regs[i]);
> +		printf("x%-2d: %016lx ", i, regs->regs[i]);
>  		if (i % 2 == 0)
>  			printf("\n");
>  	}

Why don't you use PRIx64 here? The regs are defined as "u64", not as
"long", so PRIx64 should fit better, shouldn't it?

 Thomas


  reply	other threads:[~2016-03-01  5:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-29 20:19 [kvm-unit-tests PATCH 0/4] add fmt warnings to printf, and fix bad uses Andrew Jones
2016-02-29 20:19 ` [kvm-unit-tests PATCH 1/4] lib: *printf: warn on format/arg mismatch Andrew Jones
2016-03-01 10:43   ` Paolo Bonzini
2016-03-01 11:01     ` Andrew Jones
2016-02-29 20:19 ` [kvm-unit-tests PATCH 2/4] lib/alloc: fix format warnings, add/use PRIx64 Andrew Jones
2016-03-01  4:58   ` Thomas Huth
2016-03-01  9:15     ` Andrew Jones
2016-03-01 11:04       ` Paolo Bonzini
2016-03-01 12:22         ` Andrew Jones
2016-03-01 10:47   ` Paolo Bonzini
2016-02-29 20:19 ` [kvm-unit-tests PATCH 3/4] arm64: fix printf format warnings Andrew Jones
2016-03-01  5:01   ` Thomas Huth [this message]
2016-03-01  9:17     ` Andrew Jones
2016-02-29 20:19 ` [kvm-unit-tests PATCH 4/4] x86: " Andrew Jones
2016-03-01  5:30   ` Thomas Huth
2016-03-01  9:24     ` Andrew Jones
2016-03-01 10:52       ` Paolo Bonzini
2016-03-01 11:02         ` Andrew Jones

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=56D5222D.8010607@redhat.com \
    --to=thuth@redhat.com \
    --cc=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.