From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] xen/arm: traps: Add missing 0x in bad_trap Date: Thu, 10 Apr 2014 13:15:22 +0100 Message-ID: <53468B5A.6040306@citrix.com> References: <1397130265-2389-1-git-send-email-julien.grall@linaro.org> <53468629.10705@citrix.com> <1397131290.9862.153.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WYDt9-0003T7-FT for xen-devel@lists.xenproject.org; Thu, 10 Apr 2014 12:15:27 +0000 In-Reply-To: <1397131290.9862.153.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xenproject.org, Julien Grall , stefano.stabellini@citrix.com, tim@xen.org List-Id: xen-devel@lists.xenproject.org On 10/04/14 13:01, Ian Campbell wrote: > On Thu, 2014-04-10 at 12:53 +0100, Andrew Cooper wrote: >> On 10/04/14 12:44, Julien Grall wrote: >>> The syndrome value is printed in hexadecimal. Prefix it by 0x for less >>> confusion. >>> >>> Signed-off-by: Julien Grall >> Xen is trying to converge on '%#' rather than an explicit 0x. > Really? I've been moving in the opposite direction because e.g. %010#lx > does the wrong thing with zero (0000000000 instead of 0x00000000). > > Not sure about plain %#x though... %#x DoesTheRightThing, and is a character shorter than its alternative. Jan appears to have replaced most of the x86 examples. I also get slightly frustrated with Format strings with an explicit width do the specified thing (limit the length of the entire formatted entry), rather than the useful thing (sticking '0x' before a number with an explicit width). By the time you have got a zero-extended explicitly-width'd format string, the 0x is hardly the end of the world > >> Also, it looks as if you want to do the same for IL > IL must be 2 or 4, for clarity it would be better as %d rather than 0x%x > I think. Agreed ~Andrew