Skip to contentSkip to conversation

virtio-input-host-pci: cleanup types

PATCH In review Gerd Hoffmann 3 participants 4 messages May 10, 2019 – May 12, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 virtio-input-host-pci: cleanup types

virtio input is virtio-1.0 only, so we don't need the -transitional and -non-transitional variants.

---
 hw/virtio/virtio-input-host-pci.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
hw/virtio/virtio-input-host-pci.c +2 -5
index 725a51ad30b4..124c4f344742 100644
@@ -13,7 +13,7 @@
 
 typedef struct VirtIOInputHostPCI VirtIOInputHostPCI;
 
-#define TYPE_VIRTIO_INPUT_HOST_PCI "virtio-input-host-pci-base"
+#define TYPE_VIRTIO_INPUT_HOST_PCI "virtio-input-host-pci"
 #define VIRTIO_INPUT_HOST_PCI(obj) \
         OBJECT_CHECK(VirtIOInputHostPCI, (obj), TYPE_VIRTIO_INPUT_HOST_PCI)
 
@@ -31,10 +31,7 @@ static void virtio_host_initfn(Object *obj)
 }
 
 static const VirtioPCIDeviceTypeInfo virtio_input_host_pci_info = {
-    .base_name             = TYPE_VIRTIO_INPUT_HOST_PCI,
-    .generic_name          = "virtio-input-host-pci",
-    .transitional_name     = "virtio-input-host-pci-transitional",
-    .non_transitional_name = "virtio-input-host-pci-non-transitional",
+    .generic_name  = TYPE_VIRTIO_INPUT_HOST_PCI,
     .parent        = TYPE_VIRTIO_INPUT_PCI,
     .instance_size = sizeof(VirtIOInputHostPCI),
     .instance_init = virtio_host_initfn,
Signature · 1 line
2.18.1
#1 lore raw

PATCH v2 2/2 virtio-input: fix Kconfig dependency and Makefile

Make VIRTIO_INPUT_HOST depend on VIRTIO_INPUT.
Use CONFIG_VIRTIO_INPUT_HOST in Makefile.

---
 hw/input/Kconfig       | 2 +-
 hw/input/Makefile.objs | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
hw/input/Kconfig +1 -1
index 50e55e353847..889363d8aef1 100644
@@ -27,7 +27,7 @@ config VIRTIO_INPUT
 config VIRTIO_INPUT_HOST
     bool
     default y
-    depends on VIRTIO && LINUX
+    depends on VIRTIO_INPUT && LINUX
 
 config VHOST_USER_INPUT
     bool
hw/input/Makefile.objs +1 -3
index 3eddf00f2bba..d1de30770854 100644
@@ -9,9 +9,7 @@ common-obj-$(CONFIG_TSC2005) += tsc2005.o
 
 common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input.o
 common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-hid.o
-ifeq ($(CONFIG_LINUX),y)
-common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-host.o
-endif
+common-obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host.o
 common-obj-$(CONFIG_VHOST_USER_INPUT) += vhost-user-input.o
 
 obj-$(CONFIG_MILKYMIST) += milkymist-softusb.o
Signature · 1 line
2.18.1
Reviewed-by on v2 1/2
#2 lore raw
In reply to Gerd Hoffmann
Quoted 5 lines · Gerd Hoffmann

virtio input is virtio-1.0 only, so we don't need the -transitional and -non-transitional variants.

Quoted 33 lines
---
 hw/virtio/virtio-input-host-pci.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
hw/virtio/virtio-input-host-pci.c +2 -6
index 725a51ad30b4..124c4f344742 100644
@@ -13,7 +13,7 @@
 
 typedef struct VirtIOInputHostPCI VirtIOInputHostPCI;
 
-#define TYPE_VIRTIO_INPUT_HOST_PCI "virtio-input-host-pci-base"
+#define TYPE_VIRTIO_INPUT_HOST_PCI "virtio-input-host-pci"
 #define VIRTIO_INPUT_HOST_PCI(obj) \
         OBJECT_CHECK(VirtIOInputHostPCI, (obj), TYPE_VIRTIO_INPUT_HOST_PCI)
 
@@ -31,10 +31,7 @@ static void virtio_host_initfn(Object *obj)
 }
 
 static const VirtioPCIDeviceTypeInfo virtio_input_host_pci_info = {
-    .base_name             = TYPE_VIRTIO_INPUT_HOST_PCI,
-    .generic_name          = "virtio-input-host-pci",
-    .transitional_name     = "virtio-input-host-pci-transitional",
-    .non_transitional_name = "virtio-input-host-pci-non-transitional",
+    .generic_name  = TYPE_VIRTIO_INPUT_HOST_PCI,
     .parent        = TYPE_VIRTIO_INPUT_PCI,
     .instance_size = sizeof(VirtIOInputHostPCI),
     .instance_init = virtio_host_initfn,
--

2.18.1

Signature · 1 line
Marc-André Lureau
Reviewed-by on v2 1/2
#3 lore raw
In reply to Gerd Hoffmann
Quoted 4 lines · Gerd Hoffmann

virtio input is virtio-1.0 only, so we don't need the -transitional and -non-transitional variants.

I assume you are merging this?

Quoted 31 lines
---
 hw/virtio/virtio-input-host-pci.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
hw/virtio/virtio-input-host-pci.c +2 -5
index 725a51ad30b4..124c4f344742 100644
@@ -13,7 +13,7 @@
 
 typedef struct VirtIOInputHostPCI VirtIOInputHostPCI;
 
-#define TYPE_VIRTIO_INPUT_HOST_PCI "virtio-input-host-pci-base"
+#define TYPE_VIRTIO_INPUT_HOST_PCI "virtio-input-host-pci"
 #define VIRTIO_INPUT_HOST_PCI(obj) \
         OBJECT_CHECK(VirtIOInputHostPCI, (obj), TYPE_VIRTIO_INPUT_HOST_PCI)
 
@@ -31,10 +31,7 @@ static void virtio_host_initfn(Object *obj)
 }
 
 static const VirtioPCIDeviceTypeInfo virtio_input_host_pci_info = {
-    .base_name             = TYPE_VIRTIO_INPUT_HOST_PCI,
-    .generic_name          = "virtio-input-host-pci",
-    .transitional_name     = "virtio-input-host-pci-transitional",
-    .non_transitional_name = "virtio-input-host-pci-non-transitional",
+    .generic_name  = TYPE_VIRTIO_INPUT_HOST_PCI,
     .parent        = TYPE_VIRTIO_INPUT_PCI,
     .instance_size = sizeof(VirtIOInputHostPCI),
     .instance_init = virtio_host_initfn,
Signature · 1 line
2.18.1