* [PATCH 0/8] qom: Rename macros for consistency (pass 2)
@ 2020-09-03 18:01 Eduardo Habkost
2020-09-03 18:01 ` [PATCH 1/8] i8254: Rename TYPE_I8254 to TYPE_ISA_PIT Eduardo Habkost
` (7 more replies)
0 siblings, 8 replies; 18+ messages in thread
From: Eduardo Habkost @ 2020-09-03 18:01 UTC (permalink / raw)
To: qemu-devel, Daniel P. Berrange
Cc: Fam Zheng, Eduardo Habkost, Michael S. Tsirkin, Gerd Hoffmann,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
Reducing boilerplate QOM code using the new OBJECT_DEFINE_* and
OBJECT_DECLARE_* macros is quite difficult when there are
multiple ways a TYPE_* constant name is written.
This series renames many type checking macros and/or TYPE_*
constants to make sure they are consistent.
This is a second pass of cleanups, incorporating suggestions
Philippe and Daniel sent when reviewing the previous series[1].
This series is based on machine-next and can be fetched from:
https://github.com/ehabkost/qemu-hacks work/qom-rename-macros-pass2
[1] https://lore.kernel.org/qemu-devel/20200902224311.1321159-1-ehabkost@redhat.com/
Eduardo Habkost (8):
i8254: Rename TYPE_I8254 to TYPE_ISA_PIT
i8254: Rename PIT to ISA_PIT
i8259: Rename TYPE_I8259 to TYPE_ISA_I8259
i8259: Rename PIC to ISA_I8259
i8259: Rename KVM_PIC to KVM_I8259
esp-pci: Rename TYPE_AM53C974_DEVICE to TYPE_AM53C974
esp-pci: Rename PCI_ESP to AM53C974
tusb6010: Rename TUSB to TUSB6010
include/hw/timer/i8254.h | 4 ++--
hw/i386/kvm/i8259.c | 6 +++---
hw/intc/i8259.c | 16 ++++++++--------
hw/scsi/esp-pci.c | 16 ++++++++--------
hw/timer/i8254.c | 10 +++++-----
hw/usb/tusb6010.c | 6 +++---
6 files changed, 29 insertions(+), 29 deletions(-)
--
2.26.2
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/8] i8254: Rename TYPE_I8254 to TYPE_ISA_PIT
2020-09-03 18:01 [PATCH 0/8] qom: Rename macros for consistency (pass 2) Eduardo Habkost
@ 2020-09-03 18:01 ` Eduardo Habkost
2020-09-04 8:44 ` Daniel P. Berrangé
2020-09-03 18:01 ` [PATCH 2/8] i8254: Rename PIT to ISA_PIT Eduardo Habkost
` (6 subsequent siblings)
7 siblings, 1 reply; 18+ messages in thread
From: Eduardo Habkost @ 2020-09-03 18:01 UTC (permalink / raw)
To: qemu-devel, Daniel P. Berrange
Cc: Fam Zheng, Eduardo Habkost, Michael S. Tsirkin, Gerd Hoffmann,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
This will make the type name constant consistent with the name of
the QOM type ("isa-pit").
Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes v1 -> v2:
* v1 subject was: "i8254: Rename TYPE_I8254 to TYPE_PIT"
* Rename it to TYPE_ISA_PIT instead of TYPE_PIT,
to be consistent with the existing "isa-pit" type
name
---
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
---
include/hw/timer/i8254.h | 4 ++--
hw/timer/i8254.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/hw/timer/i8254.h b/include/hw/timer/i8254.h
index 1a522a2457..b21e67c124 100644
--- a/include/hw/timer/i8254.h
+++ b/include/hw/timer/i8254.h
@@ -45,7 +45,7 @@ typedef struct PITCommonClass PITCommonClass;
DECLARE_OBJ_CHECKERS(PITCommonState, PITCommonClass,
PIT_COMMON, TYPE_PIT_COMMON)
-#define TYPE_I8254 "isa-pit"
+#define TYPE_ISA_PIT "isa-pit"
#define TYPE_KVM_I8254 "kvm-pit"
static inline ISADevice *i8254_pit_init(ISABus *bus, int base, int isa_irq,
@@ -54,7 +54,7 @@ static inline ISADevice *i8254_pit_init(ISABus *bus, int base, int isa_irq,
DeviceState *dev;
ISADevice *d;
- d = isa_new(TYPE_I8254);
+ d = isa_new(TYPE_ISA_PIT);
dev = DEVICE(d);
qdev_prop_set_uint32(dev, "iobase", base);
isa_realize_and_unref(d, bus, &error_fatal);
diff --git a/hw/timer/i8254.c b/hw/timer/i8254.c
index c01ee2c72a..5666bcb4ef 100644
--- a/hw/timer/i8254.c
+++ b/hw/timer/i8254.c
@@ -39,7 +39,7 @@
typedef struct PITClass PITClass;
DECLARE_CLASS_CHECKERS(PITClass, PIT,
- TYPE_I8254)
+ TYPE_ISA_PIT)
struct PITClass {
PITCommonClass parent_class;
@@ -370,7 +370,7 @@ static void pit_class_initfn(ObjectClass *klass, void *data)
}
static const TypeInfo pit_info = {
- .name = TYPE_I8254,
+ .name = TYPE_ISA_PIT,
.parent = TYPE_PIT_COMMON,
.instance_size = sizeof(PITCommonState),
.class_init = pit_class_initfn,
--
2.26.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/8] i8254: Rename PIT to ISA_PIT
2020-09-03 18:01 [PATCH 0/8] qom: Rename macros for consistency (pass 2) Eduardo Habkost
2020-09-03 18:01 ` [PATCH 1/8] i8254: Rename TYPE_I8254 to TYPE_ISA_PIT Eduardo Habkost
@ 2020-09-03 18:01 ` Eduardo Habkost
2020-09-04 8:44 ` Daniel P. Berrangé
2020-09-03 18:01 ` [PATCH 3/8] i8259: Rename TYPE_I8259 to TYPE_ISA_I8259 Eduardo Habkost
` (5 subsequent siblings)
7 siblings, 1 reply; 18+ messages in thread
From: Eduardo Habkost @ 2020-09-03 18:01 UTC (permalink / raw)
To: qemu-devel, Daniel P. Berrange
Cc: Fam Zheng, Eduardo Habkost, Michael S. Tsirkin, Gerd Hoffmann,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
Rename type checking function to be consistent with the type name
constant (TYPE_ISA_PIT) and type name string ("isa-pit").
Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
---
hw/timer/i8254.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/timer/i8254.c b/hw/timer/i8254.c
index 5666bcb4ef..3f63e7b936 100644
--- a/hw/timer/i8254.c
+++ b/hw/timer/i8254.c
@@ -38,7 +38,7 @@
#define RW_STATE_WORD1 4
typedef struct PITClass PITClass;
-DECLARE_CLASS_CHECKERS(PITClass, PIT,
+DECLARE_CLASS_CHECKERS(PITClass, ISA_PIT,
TYPE_ISA_PIT)
struct PITClass {
@@ -334,7 +334,7 @@ static void pit_post_load(PITCommonState *s)
static void pit_realizefn(DeviceState *dev, Error **errp)
{
PITCommonState *pit = PIT_COMMON(dev);
- PITClass *pc = PIT_GET_CLASS(dev);
+ PITClass *pc = ISA_PIT_GET_CLASS(dev);
PITChannelState *s;
s = &pit->channels[0];
@@ -357,7 +357,7 @@ static Property pit_properties[] = {
static void pit_class_initfn(ObjectClass *klass, void *data)
{
- PITClass *pc = PIT_CLASS(klass);
+ PITClass *pc = ISA_PIT_CLASS(klass);
PITCommonClass *k = PIT_COMMON_CLASS(klass);
DeviceClass *dc = DEVICE_CLASS(klass);
--
2.26.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 3/8] i8259: Rename TYPE_I8259 to TYPE_ISA_I8259
2020-09-03 18:01 [PATCH 0/8] qom: Rename macros for consistency (pass 2) Eduardo Habkost
2020-09-03 18:01 ` [PATCH 1/8] i8254: Rename TYPE_I8254 to TYPE_ISA_PIT Eduardo Habkost
2020-09-03 18:01 ` [PATCH 2/8] i8254: Rename PIT to ISA_PIT Eduardo Habkost
@ 2020-09-03 18:01 ` Eduardo Habkost
2020-09-04 8:46 ` Daniel P. Berrangé
2020-09-03 18:01 ` [PATCH 4/8] i8259: Rename PIC to ISA_I8259 Eduardo Habkost
` (4 subsequent siblings)
7 siblings, 1 reply; 18+ messages in thread
From: Eduardo Habkost @ 2020-09-03 18:01 UTC (permalink / raw)
To: qemu-devel, Daniel P. Berrange
Cc: Fam Zheng, Eduardo Habkost, Michael S. Tsirkin, Gerd Hoffmann,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
This will make the type name constant consistent with QOM
type name string ("isa-i8259").
Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes v1 ->v2:
* v1 subject was "i8259: Rename TYPE_I8259 to TYPE_PIC"
* Rename it to TYPE_ISA_I8259 instead, to be consistent
with the QOM type name ("isa-i8259")
---
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
---
hw/intc/i8259.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c
index 344fd04db1..ab55163340 100644
--- a/hw/intc/i8259.c
+++ b/hw/intc/i8259.c
@@ -37,10 +37,10 @@
//#define DEBUG_IRQ_LATENCY
-#define TYPE_I8259 "isa-i8259"
+#define TYPE_ISA_I8259 "isa-i8259"
typedef struct PICClass PICClass;
DECLARE_CLASS_CHECKERS(PICClass, PIC,
- TYPE_I8259)
+ TYPE_ISA_I8259)
/**
* PICClass:
@@ -418,7 +418,7 @@ qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq)
irq_set = g_new0(qemu_irq, ISA_NUM_IRQS);
- isadev = i8259_init_chip(TYPE_I8259, bus, true);
+ isadev = i8259_init_chip(TYPE_ISA_I8259, bus, true);
dev = DEVICE(isadev);
qdev_connect_gpio_out(dev, 0, parent_irq);
@@ -428,7 +428,7 @@ qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq)
isa_pic = dev;
- isadev = i8259_init_chip(TYPE_I8259, bus, false);
+ isadev = i8259_init_chip(TYPE_ISA_I8259, bus, false);
dev = DEVICE(isadev);
qdev_connect_gpio_out(dev, 0, irq_set[2]);
@@ -451,7 +451,7 @@ static void i8259_class_init(ObjectClass *klass, void *data)
}
static const TypeInfo i8259_info = {
- .name = TYPE_I8259,
+ .name = TYPE_ISA_I8259,
.instance_size = sizeof(PICCommonState),
.parent = TYPE_PIC_COMMON,
.class_init = i8259_class_init,
--
2.26.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 4/8] i8259: Rename PIC to ISA_I8259
2020-09-03 18:01 [PATCH 0/8] qom: Rename macros for consistency (pass 2) Eduardo Habkost
` (2 preceding siblings ...)
2020-09-03 18:01 ` [PATCH 3/8] i8259: Rename TYPE_I8259 to TYPE_ISA_I8259 Eduardo Habkost
@ 2020-09-03 18:01 ` Eduardo Habkost
2020-09-04 8:48 ` Daniel P. Berrangé
2020-09-03 18:01 ` [PATCH 5/8] i8259: Rename KVM_PIC to KVM_I8259 Eduardo Habkost
` (3 subsequent siblings)
7 siblings, 1 reply; 18+ messages in thread
From: Eduardo Habkost @ 2020-09-03 18:01 UTC (permalink / raw)
To: qemu-devel, Daniel P. Berrange
Cc: Fam Zheng, Eduardo Habkost, Michael S. Tsirkin, Gerd Hoffmann,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
Rename the type checking function to be consistent with the type
name constant (TYPE_ISA_I8259) and the QOM type name string
("isa-i8259").
Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
---
hw/intc/i8259.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c
index ab55163340..61422e6fef 100644
--- a/hw/intc/i8259.c
+++ b/hw/intc/i8259.c
@@ -39,7 +39,7 @@
#define TYPE_ISA_I8259 "isa-i8259"
typedef struct PICClass PICClass;
-DECLARE_CLASS_CHECKERS(PICClass, PIC,
+DECLARE_CLASS_CHECKERS(PICClass, ISA_I8259,
TYPE_ISA_I8259)
/**
@@ -396,7 +396,7 @@ static const MemoryRegionOps pic_elcr_ioport_ops = {
static void pic_realize(DeviceState *dev, Error **errp)
{
PICCommonState *s = PIC_COMMON(dev);
- PICClass *pc = PIC_GET_CLASS(dev);
+ PICClass *pc = ISA_I8259_GET_CLASS(dev);
memory_region_init_io(&s->base_io, OBJECT(s), &pic_base_ioport_ops, s,
"pic", 2);
@@ -443,7 +443,7 @@ qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq)
static void i8259_class_init(ObjectClass *klass, void *data)
{
- PICClass *k = PIC_CLASS(klass);
+ PICClass *k = ISA_I8259_CLASS(klass);
DeviceClass *dc = DEVICE_CLASS(klass);
device_class_set_parent_realize(dc, pic_realize, &k->parent_realize);
--
2.26.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 5/8] i8259: Rename KVM_PIC to KVM_I8259
2020-09-03 18:01 [PATCH 0/8] qom: Rename macros for consistency (pass 2) Eduardo Habkost
` (3 preceding siblings ...)
2020-09-03 18:01 ` [PATCH 4/8] i8259: Rename PIC to ISA_I8259 Eduardo Habkost
@ 2020-09-03 18:01 ` Eduardo Habkost
2020-09-04 8:48 ` Daniel P. Berrangé
2020-09-03 18:01 ` [PATCH 6/8] esp-pci: Rename TYPE_AM53C974_DEVICE to TYPE_AM53C974 Eduardo Habkost
` (2 subsequent siblings)
7 siblings, 1 reply; 18+ messages in thread
From: Eduardo Habkost @ 2020-09-03 18:01 UTC (permalink / raw)
To: qemu-devel, Daniel P. Berrange
Cc: Fam Zheng, Eduardo Habkost, Michael S. Tsirkin, Gerd Hoffmann,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
Rename the type checking function to be consistent with the type
name constant (TYPE_KVM_I8259) and type name string
("kvm-i8259").
Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: qemu-devel@nongnu.org
---
hw/i386/kvm/i8259.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/i386/kvm/i8259.c b/hw/i386/kvm/i8259.c
index 3f8bf69e9c..46a1d31b1b 100644
--- a/hw/i386/kvm/i8259.c
+++ b/hw/i386/kvm/i8259.c
@@ -21,7 +21,7 @@
#define TYPE_KVM_I8259 "kvm-i8259"
typedef struct KVMPICClass KVMPICClass;
-DECLARE_CLASS_CHECKERS(KVMPICClass, KVM_PIC,
+DECLARE_CLASS_CHECKERS(KVMPICClass, KVM_I8259,
TYPE_KVM_I8259)
/**
@@ -123,7 +123,7 @@ static void kvm_pic_set_irq(void *opaque, int irq, int level)
static void kvm_pic_realize(DeviceState *dev, Error **errp)
{
PICCommonState *s = PIC_COMMON(dev);
- KVMPICClass *kpc = KVM_PIC_GET_CLASS(dev);
+ KVMPICClass *kpc = KVM_I8259_GET_CLASS(dev);
memory_region_init_io(&s->base_io, OBJECT(dev), NULL, NULL, "kvm-pic", 2);
memory_region_init_io(&s->elcr_io, OBJECT(dev), NULL, NULL, "kvm-elcr", 1);
@@ -141,7 +141,7 @@ qemu_irq *kvm_i8259_init(ISABus *bus)
static void kvm_i8259_class_init(ObjectClass *klass, void *data)
{
- KVMPICClass *kpc = KVM_PIC_CLASS(klass);
+ KVMPICClass *kpc = KVM_I8259_CLASS(klass);
PICCommonClass *k = PIC_COMMON_CLASS(klass);
DeviceClass *dc = DEVICE_CLASS(klass);
--
2.26.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 6/8] esp-pci: Rename TYPE_AM53C974_DEVICE to TYPE_AM53C974
2020-09-03 18:01 [PATCH 0/8] qom: Rename macros for consistency (pass 2) Eduardo Habkost
` (4 preceding siblings ...)
2020-09-03 18:01 ` [PATCH 5/8] i8259: Rename KVM_PIC to KVM_I8259 Eduardo Habkost
@ 2020-09-03 18:01 ` Eduardo Habkost
2020-09-04 8:48 ` Daniel P. Berrangé
2020-09-03 18:01 ` [PATCH 7/8] esp-pci: Rename PCI_ESP to AM53C974 Eduardo Habkost
2020-09-03 18:01 ` [PATCH 8/8] tusb6010: Rename TUSB to TUSB6010 Eduardo Habkost
7 siblings, 1 reply; 18+ messages in thread
From: Eduardo Habkost @ 2020-09-03 18:01 UTC (permalink / raw)
To: qemu-devel, Daniel P. Berrange
Cc: Fam Zheng, Eduardo Habkost, Michael S. Tsirkin, Gerd Hoffmann,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
This will make the type name constant consistent with the QOM
type name string ("am53c974").
Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes v1 -> v2:
* v1 subject was "scsi: Rename TYPE_AM53C974_DEVICE to TYPE_PCI_ESP"
* Rename it to TYPE_AM53C974 instead, to be consistent with QOM
type name ("am53c974")
---
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Fam Zheng <fam@euphon.net>
Cc: qemu-devel@nongnu.org
---
hw/scsi/esp-pci.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/scsi/esp-pci.c b/hw/scsi/esp-pci.c
index 2ce96dc56e..e30a911b21 100644
--- a/hw/scsi/esp-pci.c
+++ b/hw/scsi/esp-pci.c
@@ -35,11 +35,11 @@
#include "qemu/module.h"
#include "qom/object.h"
-#define TYPE_AM53C974_DEVICE "am53c974"
+#define TYPE_AM53C974 "am53c974"
typedef struct PCIESPState PCIESPState;
DECLARE_INSTANCE_CHECKER(PCIESPState, PCI_ESP,
- TYPE_AM53C974_DEVICE)
+ TYPE_AM53C974)
#define DMA_CMD 0x0
#define DMA_STC 0x1
@@ -400,7 +400,7 @@ static void esp_pci_class_init(ObjectClass *klass, void *data)
}
static const TypeInfo esp_pci_info = {
- .name = TYPE_AM53C974_DEVICE,
+ .name = TYPE_AM53C974,
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(PCIESPState),
.class_init = esp_pci_class_init,
@@ -525,7 +525,7 @@ static void dc390_class_init(ObjectClass *klass, void *data)
static const TypeInfo dc390_info = {
.name = TYPE_DC390_DEVICE,
- .parent = TYPE_AM53C974_DEVICE,
+ .parent = TYPE_AM53C974,
.instance_size = sizeof(DC390State),
.class_init = dc390_class_init,
};
--
2.26.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 7/8] esp-pci: Rename PCI_ESP to AM53C974
2020-09-03 18:01 [PATCH 0/8] qom: Rename macros for consistency (pass 2) Eduardo Habkost
` (5 preceding siblings ...)
2020-09-03 18:01 ` [PATCH 6/8] esp-pci: Rename TYPE_AM53C974_DEVICE to TYPE_AM53C974 Eduardo Habkost
@ 2020-09-03 18:01 ` Eduardo Habkost
2020-09-04 8:49 ` Daniel P. Berrangé
2020-09-03 18:01 ` [PATCH 8/8] tusb6010: Rename TUSB to TUSB6010 Eduardo Habkost
7 siblings, 1 reply; 18+ messages in thread
From: Eduardo Habkost @ 2020-09-03 18:01 UTC (permalink / raw)
To: qemu-devel, Daniel P. Berrange
Cc: Fam Zheng, Eduardo Habkost, Michael S. Tsirkin, Gerd Hoffmann,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
Rename the type checking function to be consistent with the type
name constant (TYPE_AM53C974) and type name string ("am53c974").
Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes v1 -> v2:
* New patch added to series v2
---
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Fam Zheng <fam@euphon.net>
Cc: qemu-devel@nongnu.org
---
hw/scsi/esp-pci.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/scsi/esp-pci.c b/hw/scsi/esp-pci.c
index e30a911b21..117383037e 100644
--- a/hw/scsi/esp-pci.c
+++ b/hw/scsi/esp-pci.c
@@ -38,7 +38,7 @@
#define TYPE_AM53C974 "am53c974"
typedef struct PCIESPState PCIESPState;
-DECLARE_INSTANCE_CHECKER(PCIESPState, PCI_ESP,
+DECLARE_INSTANCE_CHECKER(PCIESPState, AM53C974,
TYPE_AM53C974)
#define DMA_CMD 0x0
@@ -305,7 +305,7 @@ static const MemoryRegionOps esp_pci_io_ops = {
static void esp_pci_hard_reset(DeviceState *dev)
{
- PCIESPState *pci = PCI_ESP(dev);
+ PCIESPState *pci = AM53C974(dev);
esp_hard_reset(&pci->esp);
pci->dma_regs[DMA_CMD] &= ~(DMA_CMD_DIR | DMA_CMD_INTE_D | DMA_CMD_INTE_P
| DMA_CMD_MDL | DMA_CMD_DIAG | DMA_CMD_MASK);
@@ -352,7 +352,7 @@ static const struct SCSIBusInfo esp_pci_scsi_info = {
static void esp_pci_scsi_realize(PCIDevice *dev, Error **errp)
{
- PCIESPState *pci = PCI_ESP(dev);
+ PCIESPState *pci = AM53C974(dev);
DeviceState *d = DEVICE(dev);
ESPState *s = &pci->esp;
uint8_t *pci_conf;
@@ -377,7 +377,7 @@ static void esp_pci_scsi_realize(PCIDevice *dev, Error **errp)
static void esp_pci_scsi_uninit(PCIDevice *d)
{
- PCIESPState *pci = PCI_ESP(d);
+ PCIESPState *pci = AM53C974(d);
qemu_free_irq(pci->esp.irq);
}
--
2.26.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 8/8] tusb6010: Rename TUSB to TUSB6010
2020-09-03 18:01 [PATCH 0/8] qom: Rename macros for consistency (pass 2) Eduardo Habkost
` (6 preceding siblings ...)
2020-09-03 18:01 ` [PATCH 7/8] esp-pci: Rename PCI_ESP to AM53C974 Eduardo Habkost
@ 2020-09-03 18:01 ` Eduardo Habkost
2020-09-03 19:17 ` Philippe Mathieu-Daudé
2020-09-04 8:50 ` Daniel P. Berrangé
7 siblings, 2 replies; 18+ messages in thread
From: Eduardo Habkost @ 2020-09-03 18:01 UTC (permalink / raw)
To: qemu-devel, Daniel P. Berrange
Cc: Fam Zheng, Eduardo Habkost, Michael S. Tsirkin, Gerd Hoffmann,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
Make type checking function name consistent with the TYPE_TUSB6010
constant and QOM type name ("tusb6010").
Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes v1 -> v2:
* v1 subject was "tusb6010: Rename TYPE_TUSB6010 to TYPE_TUSB"
* Rename TUSB macro to TUSB6010 instead, to keep it consistent
with the QOM type name ("tusb6010")
---
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
---
hw/usb/tusb6010.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/usb/tusb6010.c b/hw/usb/tusb6010.c
index 2bee3ae59f..dd20996d13 100644
--- a/hw/usb/tusb6010.c
+++ b/hw/usb/tusb6010.c
@@ -32,7 +32,7 @@
#define TYPE_TUSB6010 "tusb6010"
typedef struct TUSBState TUSBState;
-DECLARE_INSTANCE_CHECKER(TUSBState, TUSB,
+DECLARE_INSTANCE_CHECKER(TUSBState, TUSB6010,
TYPE_TUSB6010)
struct TUSBState {
@@ -779,7 +779,7 @@ static void tusb6010_irq(void *opaque, int source, int level)
static void tusb6010_reset(DeviceState *dev)
{
- TUSBState *s = TUSB(dev);
+ TUSBState *s = TUSB6010(dev);
int i;
s->test_reset = TUSB_PROD_TEST_RESET_VAL;
@@ -815,7 +815,7 @@ static void tusb6010_reset(DeviceState *dev)
static void tusb6010_realize(DeviceState *dev, Error **errp)
{
- TUSBState *s = TUSB(dev);
+ TUSBState *s = TUSB6010(dev);
SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
s->otg_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, tusb_otg_tick, s);
--
2.26.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 8/8] tusb6010: Rename TUSB to TUSB6010
2020-09-03 18:01 ` [PATCH 8/8] tusb6010: Rename TUSB to TUSB6010 Eduardo Habkost
@ 2020-09-03 19:17 ` Philippe Mathieu-Daudé
2020-09-04 8:50 ` Daniel P. Berrangé
1 sibling, 0 replies; 18+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-03 19:17 UTC (permalink / raw)
To: Eduardo Habkost, qemu-devel, Daniel P. Berrange
Cc: Fam Zheng, Michael S. Tsirkin, Gerd Hoffmann, Paolo Bonzini,
Richard Henderson
On 9/3/20 8:01 PM, Eduardo Habkost wrote:
> Make type checking function name consistent with the TYPE_TUSB6010
> constant and QOM type name ("tusb6010").
>
> Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Changes v1 -> v2:
> * v1 subject was "tusb6010: Rename TYPE_TUSB6010 to TYPE_TUSB"
> * Rename TUSB macro to TUSB6010 instead, to keep it consistent
> with the QOM type name ("tusb6010")
Thanks!
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/8] i8254: Rename TYPE_I8254 to TYPE_ISA_PIT
2020-09-03 18:01 ` [PATCH 1/8] i8254: Rename TYPE_I8254 to TYPE_ISA_PIT Eduardo Habkost
@ 2020-09-04 8:44 ` Daniel P. Berrangé
0 siblings, 0 replies; 18+ messages in thread
From: Daniel P. Berrangé @ 2020-09-04 8:44 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Fam Zheng, Michael S. Tsirkin, qemu-devel, Gerd Hoffmann,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
On Thu, Sep 03, 2020 at 02:01:21PM -0400, Eduardo Habkost wrote:
> This will make the type name constant consistent with the name of
> the QOM type ("isa-pit").
>
> Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Changes v1 -> v2:
> * v1 subject was: "i8254: Rename TYPE_I8254 to TYPE_PIT"
> * Rename it to TYPE_ISA_PIT instead of TYPE_PIT,
> to be consistent with the existing "isa-pit" type
> name
> ---
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: qemu-devel@nongnu.org
> ---
> include/hw/timer/i8254.h | 4 ++--
> hw/timer/i8254.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 :|
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/8] i8254: Rename PIT to ISA_PIT
2020-09-03 18:01 ` [PATCH 2/8] i8254: Rename PIT to ISA_PIT Eduardo Habkost
@ 2020-09-04 8:44 ` Daniel P. Berrangé
0 siblings, 0 replies; 18+ messages in thread
From: Daniel P. Berrangé @ 2020-09-04 8:44 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Fam Zheng, Michael S. Tsirkin, qemu-devel, Gerd Hoffmann,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
On Thu, Sep 03, 2020 at 02:01:22PM -0400, Eduardo Habkost wrote:
> Rename type checking function to be consistent with the type name
> constant (TYPE_ISA_PIT) and type name string ("isa-pit").
>
> Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: qemu-devel@nongnu.org
> ---
> hw/timer/i8254.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 :|
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/8] i8259: Rename TYPE_I8259 to TYPE_ISA_I8259
2020-09-03 18:01 ` [PATCH 3/8] i8259: Rename TYPE_I8259 to TYPE_ISA_I8259 Eduardo Habkost
@ 2020-09-04 8:46 ` Daniel P. Berrangé
0 siblings, 0 replies; 18+ messages in thread
From: Daniel P. Berrangé @ 2020-09-04 8:46 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Fam Zheng, Michael S. Tsirkin, qemu-devel, Gerd Hoffmann,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
On Thu, Sep 03, 2020 at 02:01:23PM -0400, Eduardo Habkost wrote:
> This will make the type name constant consistent with QOM
> type name string ("isa-i8259").
>
> Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Changes v1 ->v2:
> * v1 subject was "i8259: Rename TYPE_I8259 to TYPE_PIC"
> * Rename it to TYPE_ISA_I8259 instead, to be consistent
> with the QOM type name ("isa-i8259")
> ---
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: qemu-devel@nongnu.org
> ---
> hw/intc/i8259.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 :|
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/8] i8259: Rename PIC to ISA_I8259
2020-09-03 18:01 ` [PATCH 4/8] i8259: Rename PIC to ISA_I8259 Eduardo Habkost
@ 2020-09-04 8:48 ` Daniel P. Berrangé
0 siblings, 0 replies; 18+ messages in thread
From: Daniel P. Berrangé @ 2020-09-04 8:48 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Fam Zheng, Michael S. Tsirkin, qemu-devel, Gerd Hoffmann,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
On Thu, Sep 03, 2020 at 02:01:24PM -0400, Eduardo Habkost wrote:
> Rename the type checking function to be consistent with the type
> name constant (TYPE_ISA_I8259) and the QOM type name string
> ("isa-i8259").
>
> Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: qemu-devel@nongnu.org
> ---
> hw/intc/i8259.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 :|
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 5/8] i8259: Rename KVM_PIC to KVM_I8259
2020-09-03 18:01 ` [PATCH 5/8] i8259: Rename KVM_PIC to KVM_I8259 Eduardo Habkost
@ 2020-09-04 8:48 ` Daniel P. Berrangé
0 siblings, 0 replies; 18+ messages in thread
From: Daniel P. Berrangé @ 2020-09-04 8:48 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Fam Zheng, Michael S. Tsirkin, qemu-devel, Gerd Hoffmann,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
On Thu, Sep 03, 2020 at 02:01:25PM -0400, Eduardo Habkost wrote:
> Rename the type checking function to be consistent with the type
> name constant (TYPE_KVM_I8259) and type name string
> ("kvm-i8259").
>
> Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Richard Henderson <rth@twiddle.net>
> Cc: Eduardo Habkost <ehabkost@redhat.com>
> Cc: qemu-devel@nongnu.org
> ---
> hw/i386/kvm/i8259.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 :|
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 6/8] esp-pci: Rename TYPE_AM53C974_DEVICE to TYPE_AM53C974
2020-09-03 18:01 ` [PATCH 6/8] esp-pci: Rename TYPE_AM53C974_DEVICE to TYPE_AM53C974 Eduardo Habkost
@ 2020-09-04 8:48 ` Daniel P. Berrangé
0 siblings, 0 replies; 18+ messages in thread
From: Daniel P. Berrangé @ 2020-09-04 8:48 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Fam Zheng, Michael S. Tsirkin, qemu-devel, Gerd Hoffmann,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
On Thu, Sep 03, 2020 at 02:01:26PM -0400, Eduardo Habkost wrote:
> This will make the type name constant consistent with the QOM
> type name string ("am53c974").
>
> Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Changes v1 -> v2:
> * v1 subject was "scsi: Rename TYPE_AM53C974_DEVICE to TYPE_PCI_ESP"
> * Rename it to TYPE_AM53C974 instead, to be consistent with QOM
> type name ("am53c974")
> ---
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Fam Zheng <fam@euphon.net>
> Cc: qemu-devel@nongnu.org
> ---
> hw/scsi/esp-pci.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 :|
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 7/8] esp-pci: Rename PCI_ESP to AM53C974
2020-09-03 18:01 ` [PATCH 7/8] esp-pci: Rename PCI_ESP to AM53C974 Eduardo Habkost
@ 2020-09-04 8:49 ` Daniel P. Berrangé
0 siblings, 0 replies; 18+ messages in thread
From: Daniel P. Berrangé @ 2020-09-04 8:49 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Fam Zheng, Michael S. Tsirkin, qemu-devel, Gerd Hoffmann,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
On Thu, Sep 03, 2020 at 02:01:27PM -0400, Eduardo Habkost wrote:
> Rename the type checking function to be consistent with the type
> name constant (TYPE_AM53C974) and type name string ("am53c974").
>
> Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Changes v1 -> v2:
> * New patch added to series v2
> ---
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Fam Zheng <fam@euphon.net>
> Cc: qemu-devel@nongnu.org
> ---
> hw/scsi/esp-pci.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 :|
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 8/8] tusb6010: Rename TUSB to TUSB6010
2020-09-03 18:01 ` [PATCH 8/8] tusb6010: Rename TUSB to TUSB6010 Eduardo Habkost
2020-09-03 19:17 ` Philippe Mathieu-Daudé
@ 2020-09-04 8:50 ` Daniel P. Berrangé
1 sibling, 0 replies; 18+ messages in thread
From: Daniel P. Berrangé @ 2020-09-04 8:50 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Fam Zheng, Michael S. Tsirkin, qemu-devel, Gerd Hoffmann,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
On Thu, Sep 03, 2020 at 02:01:28PM -0400, Eduardo Habkost wrote:
> Make type checking function name consistent with the TYPE_TUSB6010
> constant and QOM type name ("tusb6010").
>
> Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Suggested-by: "Daniel P. Berrangé" <berrange@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Changes v1 -> v2:
> * v1 subject was "tusb6010: Rename TYPE_TUSB6010 to TYPE_TUSB"
> * Rename TUSB macro to TUSB6010 instead, to keep it consistent
> with the QOM type name ("tusb6010")
> ---
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: qemu-devel@nongnu.org
> ---
> hw/usb/tusb6010.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 :|
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2020-09-04 8:51 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03 18:01 [PATCH 0/8] qom: Rename macros for consistency (pass 2) Eduardo Habkost
2020-09-03 18:01 ` [PATCH 1/8] i8254: Rename TYPE_I8254 to TYPE_ISA_PIT Eduardo Habkost
2020-09-04 8:44 ` Daniel P. Berrangé
2020-09-03 18:01 ` [PATCH 2/8] i8254: Rename PIT to ISA_PIT Eduardo Habkost
2020-09-04 8:44 ` Daniel P. Berrangé
2020-09-03 18:01 ` [PATCH 3/8] i8259: Rename TYPE_I8259 to TYPE_ISA_I8259 Eduardo Habkost
2020-09-04 8:46 ` Daniel P. Berrangé
2020-09-03 18:01 ` [PATCH 4/8] i8259: Rename PIC to ISA_I8259 Eduardo Habkost
2020-09-04 8:48 ` Daniel P. Berrangé
2020-09-03 18:01 ` [PATCH 5/8] i8259: Rename KVM_PIC to KVM_I8259 Eduardo Habkost
2020-09-04 8:48 ` Daniel P. Berrangé
2020-09-03 18:01 ` [PATCH 6/8] esp-pci: Rename TYPE_AM53C974_DEVICE to TYPE_AM53C974 Eduardo Habkost
2020-09-04 8:48 ` Daniel P. Berrangé
2020-09-03 18:01 ` [PATCH 7/8] esp-pci: Rename PCI_ESP to AM53C974 Eduardo Habkost
2020-09-04 8:49 ` Daniel P. Berrangé
2020-09-03 18:01 ` [PATCH 8/8] tusb6010: Rename TUSB to TUSB6010 Eduardo Habkost
2020-09-03 19:17 ` Philippe Mathieu-Daudé
2020-09-04 8:50 ` Daniel P. Berrangé
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.