[PATCH 1/1] arm64: Correcting format specifier for printing 64 bit addresses

Paolo Bonzini pbonzini at redhat.com
Wed Dec 14 08:35:53 PST 2016



On 06/12/2016 17:11, Christoffer Dall wrote:
> +		kvm_err("Unsupported guest CP%d access at: %08lx\n",
> +			cp, *vcpu_pc(vcpu));
> +	else
> +		kvm_err("Unsupported guest CP%d access at: %016lx\n",
> +			cp, *vcpu_pc(vcpu));
> 
> It feels a bit much to me to have an if-statement to differentiate the
> number of leading zeros, so if it's important to always have fixed
> widths then I would just use %016lx in both cases.

Really, this is just a debugging message.  Just use "0x%lx" and let's
stop bikeshedding. :)

Paolo



More information about the linux-arm-kernel mailing list