All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] typedefs: Put them back into alphabetical order
@ 2015-11-19 12:29 Markus Armbruster
  2015-11-19 13:03 ` Dr. David Alan Gilbert
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Markus Armbruster @ 2015-11-19 12:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

"Please keep this list in alphabetical order" has been more honoured
in the breach than in the observance.  Clean up.

While there, drop a redundant struct declaration.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 include/qemu/typedefs.h | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index 6b1093d..3eedcf4 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -3,7 +3,6 @@
 
 /* A load of opaque types so that device init declarations don't have to
    pull in all the real definitions.  */
-struct Monitor;
 
 /* Please keep this list in alphabetical order */
 typedef struct AdapterInfo AdapterInfo;
@@ -19,8 +18,8 @@ typedef struct BusState BusState;
 typedef struct CharDriverState CharDriverState;
 typedef struct CompatProperty CompatProperty;
 typedef struct CPUAddressSpace CPUAddressSpace;
-typedef struct DeviceState DeviceState;
 typedef struct DeviceListener DeviceListener;
+typedef struct DeviceState DeviceState;
 typedef struct DisplayChangeListener DisplayChangeListener;
 typedef struct DisplayState DisplayState;
 typedef struct DisplaySurface DisplaySurface;
@@ -46,6 +45,7 @@ typedef struct MigrationIncomingState MigrationIncomingState;
 typedef struct MigrationParams MigrationParams;
 typedef struct MigrationState MigrationState;
 typedef struct Monitor Monitor;
+typedef struct MonitorDef MonitorDef;
 typedef struct MouseTransformInfo MouseTransformInfo;
 typedef struct MSIMessage MSIMessage;
 typedef struct NetClientState NetClientState;
@@ -63,13 +63,13 @@ typedef struct PCIESlot PCIESlot;
 typedef struct PCIExpressDevice PCIExpressDevice;
 typedef struct PCIExpressHost PCIExpressHost;
 typedef struct PCIHostState PCIHostState;
-typedef struct PCMachineState PCMachineState;
 typedef struct PCMachineClass PCMachineClass;
+typedef struct PCMachineState PCMachineState;
 typedef struct PCMCIACardState PCMCIACardState;
 typedef struct PixelFormat PixelFormat;
 typedef struct PostcopyDiscardState PostcopyDiscardState;
-typedef struct PropertyInfo PropertyInfo;
 typedef struct Property Property;
+typedef struct PropertyInfo PropertyInfo;
 typedef struct QEMUBH QEMUBH;
 typedef struct QemuConsole QemuConsole;
 typedef struct QEMUFile QEMUFile;
@@ -78,10 +78,10 @@ typedef struct QemuOpts QemuOpts;
 typedef struct QemuOptsList QemuOptsList;
 typedef struct QEMUSGList QEMUSGList;
 typedef struct QEMUSizedBuffer QEMUSizedBuffer;
-typedef struct QEMUTimerListGroup QEMUTimerListGroup;
 typedef struct QEMUTimer QEMUTimer;
-typedef struct Range Range;
+typedef struct QEMUTimerListGroup QEMUTimerListGroup;
 typedef struct RAMBlock RAMBlock;
+typedef struct Range Range;
 typedef struct SerialState SerialState;
 typedef struct SHPCDevice SHPCDevice;
 typedef struct SMBusDevice SMBusDevice;
@@ -89,6 +89,5 @@ typedef struct SSIBus SSIBus;
 typedef struct uWireSlave uWireSlave;
 typedef struct VirtIODevice VirtIODevice;
 typedef struct Visitor Visitor;
-typedef struct MonitorDef MonitorDef;
 
 #endif /* QEMU_TYPEDEFS_H */
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] typedefs: Put them back into alphabetical order
  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-24 14:40 ` Markus Armbruster
  2015-11-29 10:51 ` Michael Tokarev
  2 siblings, 1 reply; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2015-11-19 13:03 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel, qemu-trivial

* 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.
> 
> While there, drop a redundant struct declaration.
> 
> Signed-off-by: Markus Armbruster <armbru@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!

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  include/qemu/typedefs.h | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
> index 6b1093d..3eedcf4 100644
> --- a/include/qemu/typedefs.h
> +++ b/include/qemu/typedefs.h
> @@ -3,7 +3,6 @@
>  
>  /* A load of opaque types so that device init declarations don't have to
>     pull in all the real definitions.  */
> -struct Monitor;
>  
>  /* Please keep this list in alphabetical order */
>  typedef struct AdapterInfo AdapterInfo;
> @@ -19,8 +18,8 @@ typedef struct BusState BusState;
>  typedef struct CharDriverState CharDriverState;
>  typedef struct CompatProperty CompatProperty;
>  typedef struct CPUAddressSpace CPUAddressSpace;
> -typedef struct DeviceState DeviceState;
>  typedef struct DeviceListener DeviceListener;
> +typedef struct DeviceState DeviceState;
>  typedef struct DisplayChangeListener DisplayChangeListener;
>  typedef struct DisplayState DisplayState;
>  typedef struct DisplaySurface DisplaySurface;
> @@ -46,6 +45,7 @@ typedef struct MigrationIncomingState MigrationIncomingState;
>  typedef struct MigrationParams MigrationParams;
>  typedef struct MigrationState MigrationState;
>  typedef struct Monitor Monitor;
> +typedef struct MonitorDef MonitorDef;
>  typedef struct MouseTransformInfo MouseTransformInfo;
>  typedef struct MSIMessage MSIMessage;
>  typedef struct NetClientState NetClientState;
> @@ -63,13 +63,13 @@ typedef struct PCIESlot PCIESlot;
>  typedef struct PCIExpressDevice PCIExpressDevice;
>  typedef struct PCIExpressHost PCIExpressHost;
>  typedef struct PCIHostState PCIHostState;
> -typedef struct PCMachineState PCMachineState;
>  typedef struct PCMachineClass PCMachineClass;
> +typedef struct PCMachineState PCMachineState;
>  typedef struct PCMCIACardState PCMCIACardState;
>  typedef struct PixelFormat PixelFormat;
>  typedef struct PostcopyDiscardState PostcopyDiscardState;
> -typedef struct PropertyInfo PropertyInfo;
>  typedef struct Property Property;
> +typedef struct PropertyInfo PropertyInfo;
>  typedef struct QEMUBH QEMUBH;
>  typedef struct QemuConsole QemuConsole;
>  typedef struct QEMUFile QEMUFile;
> @@ -78,10 +78,10 @@ typedef struct QemuOpts QemuOpts;
>  typedef struct QemuOptsList QemuOptsList;
>  typedef struct QEMUSGList QEMUSGList;
>  typedef struct QEMUSizedBuffer QEMUSizedBuffer;
> -typedef struct QEMUTimerListGroup QEMUTimerListGroup;
>  typedef struct QEMUTimer QEMUTimer;
> -typedef struct Range Range;
> +typedef struct QEMUTimerListGroup QEMUTimerListGroup;
>  typedef struct RAMBlock RAMBlock;
> +typedef struct Range Range;
>  typedef struct SerialState SerialState;
>  typedef struct SHPCDevice SHPCDevice;
>  typedef struct SMBusDevice SMBusDevice;
> @@ -89,6 +89,5 @@ typedef struct SSIBus SSIBus;
>  typedef struct uWireSlave uWireSlave;
>  typedef struct VirtIODevice VirtIODevice;
>  typedef struct Visitor Visitor;
> -typedef struct MonitorDef MonitorDef;
>  
>  #endif /* QEMU_TYPEDEFS_H */
> -- 
> 2.4.3
> 
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] typedefs: Put them back into alphabetical order
  2015-11-19 13:03 ` Dr. David Alan Gilbert
@ 2015-11-19 13:10   ` Daniel P. Berrange
  2015-11-19 21:29     ` Eric Blake
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel P. Berrange @ 2015-11-19 13:10 UTC (permalink / raw)
  To: Dr. David Alan Gilbert; +Cc: qemu-trivial, Markus Armbruster, qemu-devel

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.
> > 
> > While there, drop a redundant struct declaration.
> > 
> > Signed-off-by: Markus Armbruster <armbru@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
   diff orig.txt sorted.txt > /dev/null

as part of 'make test' would suffice

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] typedefs: Put them back into alphabetical order
  2015-11-19 13:10   ` Daniel P. Berrange
@ 2015-11-19 21:29     ` Eric Blake
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Blake @ 2015-11-19 21:29 UTC (permalink / raw)
  To: Daniel P. Berrange, Dr. David Alan Gilbert
  Cc: qemu-devel, qemu-trivial, Markus Armbruster

[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] typedefs: Put them back into alphabetical order
  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-24 14:40 ` Markus Armbruster
  2015-11-29 10:51 ` Michael Tokarev
  2 siblings, 0 replies; 6+ messages in thread
From: Markus Armbruster @ 2015-11-24 14:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

Fat-fingered the cc.

Markus Armbruster <armbru@redhat.com> writes:

> "Please keep this list in alphabetical order" has been more honoured
> in the breach than in the observance.  Clean up.
>
> While there, drop a redundant struct declaration.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  include/qemu/typedefs.h | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
> index 6b1093d..3eedcf4 100644
> --- a/include/qemu/typedefs.h
> +++ b/include/qemu/typedefs.h
> @@ -3,7 +3,6 @@
>  
>  /* A load of opaque types so that device init declarations don't have to
>     pull in all the real definitions.  */
> -struct Monitor;
>  
>  /* Please keep this list in alphabetical order */
>  typedef struct AdapterInfo AdapterInfo;
> @@ -19,8 +18,8 @@ typedef struct BusState BusState;
>  typedef struct CharDriverState CharDriverState;
>  typedef struct CompatProperty CompatProperty;
>  typedef struct CPUAddressSpace CPUAddressSpace;
> -typedef struct DeviceState DeviceState;
>  typedef struct DeviceListener DeviceListener;
> +typedef struct DeviceState DeviceState;
>  typedef struct DisplayChangeListener DisplayChangeListener;
>  typedef struct DisplayState DisplayState;
>  typedef struct DisplaySurface DisplaySurface;
> @@ -46,6 +45,7 @@ typedef struct MigrationIncomingState MigrationIncomingState;
>  typedef struct MigrationParams MigrationParams;
>  typedef struct MigrationState MigrationState;
>  typedef struct Monitor Monitor;
> +typedef struct MonitorDef MonitorDef;
>  typedef struct MouseTransformInfo MouseTransformInfo;
>  typedef struct MSIMessage MSIMessage;
>  typedef struct NetClientState NetClientState;
> @@ -63,13 +63,13 @@ typedef struct PCIESlot PCIESlot;
>  typedef struct PCIExpressDevice PCIExpressDevice;
>  typedef struct PCIExpressHost PCIExpressHost;
>  typedef struct PCIHostState PCIHostState;
> -typedef struct PCMachineState PCMachineState;
>  typedef struct PCMachineClass PCMachineClass;
> +typedef struct PCMachineState PCMachineState;
>  typedef struct PCMCIACardState PCMCIACardState;
>  typedef struct PixelFormat PixelFormat;
>  typedef struct PostcopyDiscardState PostcopyDiscardState;
> -typedef struct PropertyInfo PropertyInfo;
>  typedef struct Property Property;
> +typedef struct PropertyInfo PropertyInfo;
>  typedef struct QEMUBH QEMUBH;
>  typedef struct QemuConsole QemuConsole;
>  typedef struct QEMUFile QEMUFile;
> @@ -78,10 +78,10 @@ typedef struct QemuOpts QemuOpts;
>  typedef struct QemuOptsList QemuOptsList;
>  typedef struct QEMUSGList QEMUSGList;
>  typedef struct QEMUSizedBuffer QEMUSizedBuffer;
> -typedef struct QEMUTimerListGroup QEMUTimerListGroup;
>  typedef struct QEMUTimer QEMUTimer;
> -typedef struct Range Range;
> +typedef struct QEMUTimerListGroup QEMUTimerListGroup;
>  typedef struct RAMBlock RAMBlock;
> +typedef struct Range Range;
>  typedef struct SerialState SerialState;
>  typedef struct SHPCDevice SHPCDevice;
>  typedef struct SMBusDevice SMBusDevice;
> @@ -89,6 +89,5 @@ typedef struct SSIBus SSIBus;
>  typedef struct uWireSlave uWireSlave;
>  typedef struct VirtIODevice VirtIODevice;
>  typedef struct Visitor Visitor;
> -typedef struct MonitorDef MonitorDef;
>  
>  #endif /* QEMU_TYPEDEFS_H */

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] typedefs: Put them back into alphabetical order
  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-24 14:40 ` Markus Armbruster
@ 2015-11-29 10:51 ` Michael Tokarev
  2 siblings, 0 replies; 6+ messages in thread
From: Michael Tokarev @ 2015-11-29 10:51 UTC (permalink / raw)
  To: Markus Armbruster, qemu-devel; +Cc: qemu-trivial

19.11.2015 15:29, Markus Armbruster wrote:
> "Please keep this list in alphabetical order" has been more honoured
> in the breach than in the observance.  Clean up.
> 
> While there, drop a redundant struct declaration.

Applied to -trivial, thank you!

/mjt

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-11-29 10:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2015-11-24 14:40 ` Markus Armbruster
2015-11-29 10:51 ` Michael Tokarev

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.