All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: qemu-devel@nongnu.org, mreitz@redhat.com, den@openvz.org,
	pbonzini@redhat.com, jsnow@redhat.com
Subject: Re: [Qemu-devel] [PATCH] trace-events: print 0x before hex numbers
Date: Fri, 28 Jul 2017 10:06:37 +0100	[thread overview]
Message-ID: <20170728090637.GI31495@redhat.com> (raw)
In-Reply-To: <20170728085547.13947-1-vsementsov@virtuozzo.com>

On Fri, Jul 28, 2017 at 11:55:47AM +0300, Vladimir Sementsov-Ogievskiy wrote:
> To make logs more readable prefix all hex values with '0x' mark.
> This is needed for consistency too, as a lot of hex values are already
> prefixed with '0x'. Also, bring all hex outputs to the common form -
> use '%#', not '0x%'.
> 
> This patch is done by two commands:
> find . -name trace-events | \
>  xargs sed -i 's/%\([-+ *.0-9]*\([hljztL]\|ll\|hh\)\?\(x\|X\|"\s*PRIx\)\)/%#\1/g'
> find . -name trace-events | xargs sed -i 's/0x%#/%#/g'

I fear that despite your cleanup, these mistakes will be frequently
re-introduced.  IOW, I think you should add to scripts/checkpatch.pl
to re-validate any patch which touches a trace-events file, to
prevent further regressions.

> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
> 
> Hi all!
> 
> It is hard to read logs, when there are hex and dec numbers in one line, when
> hex number doesn't contain any letters and don't have '0x' prefix. Hope I'm
> not alone who is not comfortable with it, so, what about a patch like this?
> May be regexp's should be improved but, I think, the common idea is clear.

Yeah, I agree - mixing decimal & hex values with no 0x prefix is horribly
misleading at best.



Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

  parent reply	other threads:[~2017-07-28  9:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-28  8:55 [Qemu-devel] [PATCH] trace-events: print 0x before hex numbers Vladimir Sementsov-Ogievskiy
2017-07-28  9:04 ` Peter Maydell
2017-07-28  9:19   ` Vladimir Sementsov-Ogievskiy
2017-07-28 12:08   ` Eric Blake
2017-07-28 12:19     ` Peter Maydell
2017-07-28 12:40       ` Eric Blake
2017-07-28  9:06 ` Daniel P. Berrange [this message]
2017-07-28  9:14   ` Vladimir Sementsov-Ogievskiy
2017-07-28  9:41 ` Cornelia Huck
2017-07-28 10:01   ` Vladimir Sementsov-Ogievskiy
2017-07-28 11:30     ` Cornelia Huck
2017-07-28 12:05 ` Stefan Hajnoczi

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=20170728090637.GI31495@redhat.com \
    --to=berrange@redhat.com \
    --cc=den@openvz.org \
    --cc=jsnow@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.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.