Skip to content
Snippets Groups Projects
Commit 30b5707c authored by Eduardo Habkost's avatar Eduardo Habkost
Browse files

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: default avatarEduardo Habkost <ehabkost@redhat.com>
Reviewed-by: default avatarCédric Le Goater <clg@kaod.org>
Acked-by: default avatarCornelia Huck <cohuck@redhat.com>
Acked-by: default avatarIgor Mammedov <imammedo@redhat.com>
Acked-by: default avatarPaul Durrant <paul@xen.org>
Acked-by: default avatarThomas Huth <thuth@redhat.com>
Message-Id: <20200916182519.415636-4-ehabkost@redhat.com>
Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
parent c734cd40
No related branches found
No related tags found
No related merge requests found
Showing
with 20 additions and 20 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment