From: Igor Mammedov <imammedo@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
xen-devel@lists.xenproject.org, "Corey Minyard" <minyard@acm.org>,
"Amit Shah" <amit@kernel.org>,
"Hervé Poussineau" <hpoussin@reactos.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
dgilbert@redhat.com, "Eduardo Habkost" <ehabkost@redhat.com>,
qemu-arm@nongnu.org, qemu-ppc@nongnu.org,
"Anthony Perard" <anthony.perard@citrix.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Stefan Berger" <stefanb@linux.ibm.com>,
"Andreas Färber" <afaerber@suse.de>,
"Artyom Tarasenko" <atar4qemu@gmail.com>,
"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH for-3.2 v3 05/14] qdev: move qdev_prop_register_global_list() to tests
Date: Tue, 20 Nov 2018 17:40:10 +0100 [thread overview]
Message-ID: <20181120174010.3999adda@redhat.com> (raw)
In-Reply-To: <20181107123652.23417-6-marcandre.lureau@redhat.com>
On Wed, 7 Nov 2018 16:36:43 +0400
Marc-André Lureau <marcandre.lureau@redhat.com> wrote:
> The function is only used by a test, move it there.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> include/hw/qdev-properties.h | 1 -
> hw/core/qdev-properties.c | 9 ---------
> tests/test-qdev-global-props.c | 18 ++++++++++++++----
> 3 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h
> index a95f4a73eb..3ab9cd2eb6 100644
> --- a/include/hw/qdev-properties.h
> +++ b/include/hw/qdev-properties.h
> @@ -249,7 +249,6 @@ void qdev_prop_set_enum(DeviceState *dev, const char *name, int value);
> void qdev_prop_set_ptr(DeviceState *dev, const char *name, void *value);
>
> void qdev_prop_register_global(GlobalProperty *prop);
> -void qdev_prop_register_global_list(GlobalProperty *props);
> int qdev_prop_check_globals(void);
> void qdev_prop_set_globals(DeviceState *dev);
> void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev,
> diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
> index ab61d502fd..bd84c4ea4c 100644
> --- a/hw/core/qdev-properties.c
> +++ b/hw/core/qdev-properties.c
> @@ -1180,15 +1180,6 @@ void qdev_prop_register_global(GlobalProperty *prop)
> global_props = g_list_append(global_props, prop);
> }
>
> -void qdev_prop_register_global_list(GlobalProperty *props)
> -{
> - int i;
> -
> - for (i = 0; props[i].driver != NULL; i++) {
> - qdev_prop_register_global(props+i);
> - }
> -}
> -
> int qdev_prop_check_globals(void)
> {
> GList *l;
> diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-global-props.c
> index ccdf6c57c1..b1eb505442 100644
> --- a/tests/test-qdev-global-props.c
> +++ b/tests/test-qdev-global-props.c
> @@ -89,6 +89,16 @@ static void test_static_prop(void)
> g_test_trap_assert_stdout("");
> }
>
> +static void register_global_properties(GlobalProperty *props)
> +{
> + int i;
> +
> + for (i = 0; props[i].driver != NULL; i++) {
> + qdev_prop_register_global(props + i);
> + }
> +}
> +
> +
> /* Test setting of static property using global properties */
> static void test_static_globalprop_subprocess(void)
> {
> @@ -98,7 +108,7 @@ static void test_static_globalprop_subprocess(void)
> {}
> };
>
> - qdev_prop_register_global_list(props);
> + register_global_properties(props);
>
> mt = STATIC_TYPE(object_new(TYPE_STATIC_PROPS));
> qdev_init_nofail(DEVICE(mt));
> @@ -216,7 +226,7 @@ static void test_dynamic_globalprop_subprocess(void)
> };
> int global_error;
>
> - qdev_prop_register_global_list(props);
> + register_global_properties(props);
>
> mt = DYNAMIC_TYPE(object_new(TYPE_DYNAMIC_PROPS));
> qdev_init_nofail(DEVICE(mt));
> @@ -261,7 +271,7 @@ static void test_dynamic_globalprop_nouser_subprocess(void)
> };
> int global_error;
>
> - qdev_prop_register_global_list(props);
> + register_global_properties(props);
>
> mt = DYNAMIC_TYPE(object_new(TYPE_DYNAMIC_PROPS));
> qdev_init_nofail(DEVICE(mt));
> @@ -299,7 +309,7 @@ static void test_subclass_global_props(void)
> {}
> };
>
> - qdev_prop_register_global_list(props);
> + register_global_properties(props);
>
> mt = STATIC_TYPE(object_new(TYPE_SUBCLASS));
> qdev_init_nofail(DEVICE(mt));
next prev parent reply other threads:[~2018-11-20 16:40 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 12:36 [Qemu-devel] [PATCH for-3.2 v3 00/14] Generalize machine compatibility properties Marc-André Lureau
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 01/14] tests: qdev_prop_check_globals() doesn't return "all_used" Marc-André Lureau
2018-11-20 15:33 ` Igor Mammedov
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 02/14] qom: make interface types abstract Marc-André Lureau
2018-11-20 16:33 ` Igor Mammedov
2018-11-20 17:42 ` Eduardo Habkost
2018-11-20 18:54 ` Laszlo Ersek
2018-11-21 9:10 ` Igor Mammedov
2018-11-23 14:03 ` Igor Mammedov
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 03/14] qom: make user_creatable_complete() specific to UserCreatable Marc-André Lureau
2018-11-20 16:39 ` Igor Mammedov
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 04/14] accel: register global_props like machine globals Marc-André Lureau
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 05/14] qdev: move qdev_prop_register_global_list() to tests Marc-André Lureau
2018-11-11 23:46 ` Philippe Mathieu-Daudé
2018-11-20 16:40 ` Igor Mammedov [this message]
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 06/14] qdev: do not mix compat props with global props Marc-André Lureau
2018-11-23 14:02 ` Igor Mammedov
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 07/14] qdev: all globals are now user-provided Marc-André Lureau
2018-11-23 14:20 ` Igor Mammedov
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 08/14] qdev-props: convert global_props to GArray Marc-André Lureau
2018-11-23 14:26 ` Igor Mammedov
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 09/14] qdev-props: remove errp from GlobalProperty Marc-André Lureau
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 10/14] qdev-props: call object_apply_global_props() Marc-André Lureau
2018-11-26 13:20 ` Igor Mammedov
2018-11-26 20:02 ` Marc-André Lureau
2018-11-27 14:12 ` Igor Mammedov
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 11/14] qom: teach interfaces to implement post-init Marc-André Lureau
2018-11-26 13:46 ` Igor Mammedov
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 12/14] machine: add compat-props interface Marc-André Lureau
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 13/14] hw/i386: add pc-i440fx-3.2 & pc-q35-3.2 Marc-André Lureau
2018-11-07 15:49 ` Marc-André Lureau
2018-11-07 19:01 ` Eduardo Habkost
2018-11-07 12:36 ` [Qemu-devel] [PATCH for-3.2 v3 14/14] hostmem: use object id for memory region name with >= 3.1 Marc-André Lureau
2018-11-26 13:55 ` [Qemu-devel] [PATCH for-3.2 v3 00/14] Generalize machine compatibility properties Igor Mammedov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181120174010.3999adda@redhat.com \
--to=imammedo@redhat.com \
--cc=afaerber@suse.de \
--cc=amit@kernel.org \
--cc=anthony.perard@citrix.com \
--cc=atar4qemu@gmail.com \
--cc=dgilbert@redhat.com \
--cc=ehabkost@redhat.com \
--cc=hpoussin@reactos.org \
--cc=marcandre.lureau@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=minyard@acm.org \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
--cc=sstabellini@kernel.org \
--cc=stefanb@linux.ibm.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).