Re: [kvm-unit-tests PATCH 3/4] arm64: fix printf format warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 01, 2016 at 06:01:33AM +0100, Thomas Huth wrote:
> On 29.02.2016 21:19, Andrew Jones wrote:
> > Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>
> > ---
> >  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?

This file is 64-bit only, never compiled for 32-bit, so long is
sufficient, and generates less clutter.

Thanks,
drew
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux