[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/5] qom: Remove module_obj_name parameter from OBJECT_DECLAR
From: |
Thomas Huth |
Subject: |
Re: [PATCH 3/5] qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros |
Date: |
Thu, 17 Sep 2020 08:53:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
On 16/09/2020 20.25, Eduardo Habkost wrote:
> 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>
> ---
Acked-by: Thomas Huth <thuth@redhat.com>