typedefs.h cleanup
cover typedefs.h cleanup
Prompted by my review of xiezhide's work. No semantic change, but not technically a bug fix, so I don't care if it goes in 3.1 or waits for 4.0.
Eric Blake (2):
typedefs: (Re-)sort entries alphabetically
numa: Match struct to typedef name
include/qemu/typedefs.h | 12 ++++++------ include/sysemu/numa.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-)
Signature · 1 line
2.17.2
PATCH 1/2 typedefs: (Re-)sort entries alphabetically
Since the last time we sorted things (2988cbeaf), we've had a few relapses that were inserted out of order. Also, we had more entries that were sorted case-insensitively than not, so let's document that convention and stick to it.
--- include/qemu/typedefs.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
include/qemu/typedefs.h +5 -5
@@ -4,7 +4,7 @@/* A load of opaque types so that device init declarations don't have to pull in all the real definitions. */ -/* Please keep this list in alphabetical order */ +/* Please keep this list in case-insensitive alphabetical order */ typedef struct AdapterInfo AdapterInfo ;typedef struct AddressSpace AddressSpace ;typedef struct AioContext AioContext ;
@@ -40,6 +40,7 @@ typedef struct HCIInfo HCIInfo;typedef struct HVFX86EmulatorState HVFX86EmulatorState ;typedef struct I2CBus I2CBus ;typedef struct I2SCodec I2SCodec ; +typedef struct IOMMUMemoryRegion IOMMUMemoryRegion ;typedef struct ISABus ISABus ;typedef struct ISADevice ISADevice ;typedef struct IsaDma IsaDma ;
@@ -49,7 +50,6 @@ typedef struct MachineState MachineState;typedef struct MemoryListener MemoryListener ;typedef struct MemoryMappingList MemoryMappingList ;typedef struct MemoryRegion MemoryRegion ; -typedef struct IOMMUMemoryRegion IOMMUMemoryRegion ;typedef struct MemoryRegionCache MemoryRegionCache ;typedef struct MemoryRegionSection MemoryRegionSection ;typedef struct MigrationIncomingState MigrationIncomingState ;
@@ -82,6 +82,8 @@ typedef struct PostcopyDiscardState PostcopyDiscardState;typedef struct Property Property ;typedef struct PropertyInfo PropertyInfo ;typedef struct PS2State PS2State ; +typedef struct QBool QBool ; +typedef struct QDict QDict ;typedef struct QEMUBH QEMUBH ;typedef struct QemuConsole QemuConsole ;typedef struct QemuDmaBuf QemuDmaBuf ;
@@ -91,12 +93,10 @@ typedef struct QemuMutex QemuMutex;typedef struct QemuOpt QemuOpt ;typedef struct QemuOpts QemuOpts ;typedef struct QemuOptsList QemuOptsList ; -typedef struct QemuSpin QemuSpin ;typedef struct QEMUSGList QEMUSGList ; +typedef struct QemuSpin QemuSpin ;typedef struct QEMUTimer QEMUTimer ;typedef struct QEMUTimerListGroup QEMUTimerListGroup ; -typedef struct QBool QBool ; -typedef struct QDict QDict ;typedef struct QJSON QJSON ;typedef struct QList QList ;typedef struct QNull QNull ;
Signature · 1 line
2.17.2
Laurent Vivier
AppliedRe: [Qemu-devel] [Qemu-trivial] [PATCH 1/2] typedefs: (Re-)sort entries alphabetically
Quoted 10 lines · Eric Blake
Since the last time we sorted things (
2988cbeaf), we've had a few relapses that were inserted out of order. Also, we had more entries that were sorted case-insensitively than not, so let's document that convention and stick to it.Signed-off-by Eric Blake <[email protected]>--- include/qemu/typedefs.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH 2/2 numa: Match struct to typedef name
In reply to Eric BlakeThere's no reason to violate our naming conventions by having a struct with a different name than its typedef. Messed up since its introduction in commit 8c85901e, but made more obvious when commit 3bfe5716 promoted it to typedefs.h.
--- include/qemu/typedefs.h | 2 +- include/sysemu/numa.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/qemu/typedefs.h +1 -1
@@ -61,6 +61,7 @@ typedef struct MSIMessage MSIMessage;typedef struct NetClientState NetClientState ;typedef struct NetFilterState NetFilterState ;typedef struct NICInfo NICInfo ; +typedef struct NodeInfo NodeInfo ;typedef struct NumaNodeMem NumaNodeMem ;typedef struct PCIBridge PCIBridge ;typedef struct PCIBus PCIBus ;
@@ -112,7 +113,6 @@ typedef struct SSIBus SSIBus;typedef struct uWireSlave uWireSlave ;typedef struct VirtIODevice VirtIODevice ;typedef struct Visitor Visitor ; -typedef struct node_info NodeInfo ;typedef void SaveStateHandler (QEMUFile *f,void *opaque);typedef int LoadStateHandler (QEMUFile *f,void *opaque,int version_id);
include/sysemu/numa.h +1 -1
@@ -9,7 +9,7 @@extern int nb_numa_nodes;/* Number of NUMA nodes */ extern bool have_numa_distance; -struct node_info { +struct NodeInfo {uint64_t node_mem;struct HostMemoryBackend *node_memdev;bool present;
Signature · 1 line
2.17.2
Eduardo Habkost
AppliedRe: [Qemu-devel] [PATCH 2/2] numa: Match struct to typedef name
Quoted 6 lines · Eric Blake
There's no reason to violate our naming conventions by having a struct with a different name than its typedef. Messed up since its introduction in commit
8c85901e, but made more obvious when commit3bfe5716promoted it totypedefs.h.Signed-off-by Eric Blake <[email protected]>
Queued on numa-next, thanks.
Signature · 1 line
Eduardo
Quoted 7 lines · Eric Blake
Prompted by my review of xiezhide's work. No semantic change, but not technically a bug fix, so I don't care if it goes in 3.1 or waits for 4.0.
Eric Blake (2):
typedefs: (Re-)sort entries alphabetically
numa: Match struct to typedef name
Series:
Quoted 3 lines · Eric Blake
Prompted by my review of xiezhide's work. No semantic change, but not technically a bug fix, so I don't care if it goes in 3.1 or waits for 4.0.
Quoted 8 lines · Eric Blake
Prompted by my review of xiezhide's work. No semantic change, but not technically a bug fix, so I don't care if it goes in 3.1 or waits for 4.0.
Eric Blake (2):
typedefs: (Re-)sort entries alphabetically
numa: Match struct to typedef name
Ping. Patch 2 is now in master (aec90730) via numa, but patch 1 got overlooked in the trivial queue, even though it has reviews.
Quoted 4 lines
include/qemu/typedefs.h | 12 ++++++------ include/sysemu/numa.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-)
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org