summaryrefslogtreecommitdiffstats
path: root/include/io
diff options
context:
space:
mode:
authorEduardo Habkost2020-09-16 20:25:17 +0200
committerEduardo Habkost2020-09-18 20:12:32 +0200
commit30b5707c269cac1ad80b72f777e52c8e08b2ff19 (patch)
tree7201b93d5b438b3a608040e71b10ffec73f9c980 /include/io
parentqom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE (diff)
downloadqemu-30b5707c269cac1ad80b72f777e52c8e08b2ff19.tar.gz
qemu-30b5707c269cac1ad80b72f777e52c8e08b2ff19.tar.xz
qemu-30b5707c269cac1ad80b72f777e52c8e08b2ff19.zip
qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros
One of the goals of having less boilerplate on QOM declarations is to avoid human error. Requiring an extra argument that is never used is an opportunity for mistakes. Remove the unused argument from OBJECT_DECLARE_TYPE and OBJECT_DECLARE_SIMPLE_TYPE. Coccinelle patch used to convert all users of the macros: @@ declarer name OBJECT_DECLARE_TYPE; identifier InstanceType, ClassType, lowercase, UPPERCASE; @@ OBJECT_DECLARE_TYPE(InstanceType, ClassType, - lowercase, UPPERCASE); @@ declarer name OBJECT_DECLARE_SIMPLE_TYPE; identifier InstanceType, lowercase, UPPERCASE; @@ OBJECT_DECLARE_SIMPLE_TYPE(InstanceType, - lowercase, UPPERCASE); Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Acked-by: Cornelia Huck <cohuck@redhat.com> Acked-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Paul Durrant <paul@xen.org> Acked-by: Thomas Huth <thuth@redhat.com> Message-Id: <20200916182519.415636-4-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/io')
-rw-r--r--include/io/channel.h2
-rw-r--r--include/io/dns-resolver.h2
-rw-r--r--include/io/net-listener.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/include/io/channel.h b/include/io/channel.h
index 245479548a..3c04f0edda 100644
--- a/include/io/channel.h
+++ b/include/io/channel.h
@@ -27,7 +27,7 @@
#define TYPE_QIO_CHANNEL "qio-channel"
OBJECT_DECLARE_TYPE(QIOChannel, QIOChannelClass,
- qio_channel, QIO_CHANNEL)
+ QIO_CHANNEL)
#define QIO_CHANNEL_ERR_BLOCK -2
diff --git a/include/io/dns-resolver.h b/include/io/dns-resolver.h
index 9d14a8d98f..01d0bd7a42 100644
--- a/include/io/dns-resolver.h
+++ b/include/io/dns-resolver.h
@@ -26,7 +26,7 @@
#include "io/task.h"
#define TYPE_QIO_DNS_RESOLVER "qio-dns-resolver"
-OBJECT_DECLARE_SIMPLE_TYPE(QIODNSResolver, qio_dns_resolver,
+OBJECT_DECLARE_SIMPLE_TYPE(QIODNSResolver,
QIO_DNS_RESOLVER)
diff --git a/include/io/net-listener.h b/include/io/net-listener.h
index 8145962fbb..ab9f291ed6 100644
--- a/include/io/net-listener.h
+++ b/include/io/net-listener.h
@@ -25,7 +25,7 @@
#include "qom/object.h"
#define TYPE_QIO_NET_LISTENER "qio-net-listener"
-OBJECT_DECLARE_SIMPLE_TYPE(QIONetListener, qio_net_listener,
+OBJECT_DECLARE_SIMPLE_TYPE(QIONetListener,
QIO_NET_LISTENER)