diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2019-03-06 15:35:37 +1100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-03-12 14:33:05 +1100 |
commit | ce2918cbc31e190e7d644c684dcc2bbcb6b9a9df (patch) | |
tree | df386cb966b057efa2e125a19dc5d5d65b4545bf /include/hw/ppc/spapr_irq.h | |
parent | dd977e4f45cba191fd65c84204cbceffc3bab48a (diff) |
spapr: Use CamelCase properly
The qemu coding standard is to use CamelCase for type and structure names,
and the pseries code follows that... sort of. There are quite a lot of
places where we bend the rules in order to preserve the capitalization of
internal acronyms like "PHB", "TCE", "DIMM" and most commonly "sPAPR".
That was a bad idea - it frequently leads to names ending up with hard to
read clusters of capital letters, and means they don't catch the eye as
type identifiers, which is kind of the point of the CamelCase convention in
the first place.
In short, keeping type identifiers look like CamelCase is more important
than preserving standard capitalization of internal "words". So, this
patch renames a heap of spapr internal type names to a more standard
CamelCase.
In addition to case changes, we also make some other identifier renames:
VIOsPAPR* -> SpaprVio*
The reverse word ordering was only ever used to mitigate the capital
cluster, so revert to the natural ordering.
VIOsPAPRVTYDevice -> SpaprVioVty
VIOsPAPRVLANDevice -> SpaprVioVlan
Brevity, since the "Device" didn't add useful information
sPAPRDRConnector -> SpaprDrc
sPAPRDRConnectorClass -> SpaprDrcClass
Brevity, and makes it clearer this is the same thing as a "DRC"
mentioned in many other places in the code
This is 100% a mechanical search-and-replace patch. It will, however,
conflict with essentially any and all outstanding patches touching the
spapr code.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/ppc/spapr_irq.h')
-rw-r--r-- | include/hw/ppc/spapr_irq.h | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/include/hw/ppc/spapr_irq.h b/include/hw/ppc/spapr_irq.h index ec1ee64fa6..b855f74e44 100644 --- a/include/hw/ppc/spapr_irq.h +++ b/include/hw/ppc/spapr_irq.h @@ -22,51 +22,51 @@ #define SPAPR_IRQ_MSI 0x1300 /* Offset of the dynamic range covered * by the bitmap allocator */ -typedef struct sPAPRMachineState sPAPRMachineState; +typedef struct SpaprMachineState SpaprMachineState; -void spapr_irq_msi_init(sPAPRMachineState *spapr, uint32_t nr_msis); -int spapr_irq_msi_alloc(sPAPRMachineState *spapr, uint32_t num, bool align, +void spapr_irq_msi_init(SpaprMachineState *spapr, uint32_t nr_msis); +int spapr_irq_msi_alloc(SpaprMachineState *spapr, uint32_t num, bool align, Error **errp); -void spapr_irq_msi_free(sPAPRMachineState *spapr, int irq, uint32_t num); -void spapr_irq_msi_reset(sPAPRMachineState *spapr); +void spapr_irq_msi_free(SpaprMachineState *spapr, int irq, uint32_t num); +void spapr_irq_msi_reset(SpaprMachineState *spapr); -typedef struct sPAPRIrq { +typedef struct SpaprIrq { uint32_t nr_irqs; uint32_t nr_msis; uint8_t ov5; - void (*init)(sPAPRMachineState *spapr, int nr_irqs, Error **errp); - int (*claim)(sPAPRMachineState *spapr, int irq, bool lsi, Error **errp); - void (*free)(sPAPRMachineState *spapr, int irq, int num); - qemu_irq (*qirq)(sPAPRMachineState *spapr, int irq); - void (*print_info)(sPAPRMachineState *spapr, Monitor *mon); - void (*dt_populate)(sPAPRMachineState *spapr, uint32_t nr_servers, + void (*init)(SpaprMachineState *spapr, int nr_irqs, Error **errp); + int (*claim)(SpaprMachineState *spapr, int irq, bool lsi, Error **errp); + void (*free)(SpaprMachineState *spapr, int irq, int num); + qemu_irq (*qirq)(SpaprMachineState *spapr, int irq); + void (*print_info)(SpaprMachineState *spapr, Monitor *mon); + void (*dt_populate)(SpaprMachineState *spapr, uint32_t nr_servers, void *fdt, uint32_t phandle); - void (*cpu_intc_create)(sPAPRMachineState *spapr, PowerPCCPU *cpu, + void (*cpu_intc_create)(SpaprMachineState *spapr, PowerPCCPU *cpu, Error **errp); - int (*post_load)(sPAPRMachineState *spapr, int version_id); - void (*reset)(sPAPRMachineState *spapr, Error **errp); + int (*post_load)(SpaprMachineState *spapr, int version_id); + void (*reset)(SpaprMachineState *spapr, Error **errp); void (*set_irq)(void *opaque, int srcno, int val); - const char *(*get_nodename)(sPAPRMachineState *spapr); -} sPAPRIrq; + const char *(*get_nodename)(SpaprMachineState *spapr); +} SpaprIrq; -extern sPAPRIrq spapr_irq_xics; -extern sPAPRIrq spapr_irq_xics_legacy; -extern sPAPRIrq spapr_irq_xive; -extern sPAPRIrq spapr_irq_dual; +extern SpaprIrq spapr_irq_xics; +extern SpaprIrq spapr_irq_xics_legacy; +extern SpaprIrq spapr_irq_xive; +extern SpaprIrq spapr_irq_dual; -void spapr_irq_init(sPAPRMachineState *spapr, Error **errp); -int spapr_irq_claim(sPAPRMachineState *spapr, int irq, bool lsi, Error **errp); -void spapr_irq_free(sPAPRMachineState *spapr, int irq, int num); -qemu_irq spapr_qirq(sPAPRMachineState *spapr, int irq); -int spapr_irq_post_load(sPAPRMachineState *spapr, int version_id); -void spapr_irq_reset(sPAPRMachineState *spapr, Error **errp); -int spapr_irq_get_phandle(sPAPRMachineState *spapr, void *fdt, Error **errp); +void spapr_irq_init(SpaprMachineState *spapr, Error **errp); +int spapr_irq_claim(SpaprMachineState *spapr, int irq, bool lsi, Error **errp); +void spapr_irq_free(SpaprMachineState *spapr, int irq, int num); +qemu_irq spapr_qirq(SpaprMachineState *spapr, int irq); +int spapr_irq_post_load(SpaprMachineState *spapr, int version_id); +void spapr_irq_reset(SpaprMachineState *spapr, Error **errp); +int spapr_irq_get_phandle(SpaprMachineState *spapr, void *fdt, Error **errp); /* * XICS legacy routines */ -int spapr_irq_find(sPAPRMachineState *spapr, int num, bool align, Error **errp); +int spapr_irq_find(SpaprMachineState *spapr, int num, bool align, Error **errp); #define spapr_irq_findone(spapr, errp) spapr_irq_find(spapr, 1, false, errp) #endif |