qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org.com,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] typedefs: Put them back into alphabetical order
Date: Thu, 19 Nov 2015 14:29:43 -0700	[thread overview]
Message-ID: <564E3F47.3030209@redhat.com> (raw)
In-Reply-To: <20151119131047.GF9247@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2072 bytes --]

On 11/19/2015 06:10 AM, Daniel P. Berrange wrote:
> On Thu, Nov 19, 2015 at 01:03:39PM +0000, Dr. David Alan Gilbert wrote:
>> * Markus Armbruster (armbru@redhat.com) wrote:
>>> "Please keep this list in alphabetical order" has been more honoured
>>> in the breach than in the observance.  Clean up.

Whose alphabet? ...

>>>
>>> While there, drop a redundant struct declaration.
>>>
>>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>>

Reviewed-by: Eric Blake <eblake@redhat.com>

>> Hmph, it's only a year since I sorted this file.
>> At least one of these changes is from a misordering within one patch!
> 
> Which just goes to show that any such rules about sorting are
> not worth the hassle unless you also provide some make rule to
> validate them as part of 'make test'. It shouldn't be too
> hard to hook it up - a make rule that runs this:
> 
>    grep typedef include/qemu/typedefs.h > orig.txt
>    sort orig.txt > sorted.txt

...This would have to be 'LC_ALL=C sort orig.txt ...' to ensure that
difference in locale doesn't change the order (whether due to
case-insensitivity, or due to ignoring whitespace).  Picking on one of
the changes in the commit:

$ printf 'typedef struct PropertyInfo PropertyInfo;\ntypedef struct
Property Property;\n' | sort # LANG=en_US.UTF-8
typedef struct PropertyInfo PropertyInfo;
typedef struct Property Property;
$ printf 'typedef struct PropertyInfo PropertyInfo;\ntypedef struct
Property Property;\n' | LC_ALL=C sort
typedef struct Property Property;
typedef struct PropertyInfo PropertyInfo;


>    diff orig.txt sorted.txt > /dev/null
> 
> as part of 'make test' would suffice

Also, Markus probably noticed the problem because I have a pending patch
that will be adding QObject to the list, and my addition will conflict
since it falls next to the fixup for Range vs. QEMUTimerListGroup.
Whichever one goes in first gets to watch the other rebase :)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2015-11-19 21:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-19 12:29 [Qemu-devel] [PATCH] typedefs: Put them back into alphabetical order Markus Armbruster
2015-11-19 13:03 ` Dr. David Alan Gilbert
2015-11-19 13:10   ` Daniel P. Berrange
2015-11-19 21:29     ` Eric Blake [this message]
2015-11-24 14:40 ` Markus Armbruster
2015-11-29 10:51 ` Michael Tokarev

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=564E3F47.3030209@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).