qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Zhao Liu <zhao1.liu@intel.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	qemu-s390x@nongnu.org, qemu-ppc@nongnu.org,
	qemu-block@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>,
	Max Filippov <jcmvbkbc@gmail.com>
Subject: Re: [PATCH 07/21] target: Replace DEVICE(object_new) -> qdev_new()
Date: Thu, 22 Feb 2024 17:54:41 +0800	[thread overview]
Message-ID: <ZdcZ4TPGX9ZJ0GRL@intel.com> (raw)
In-Reply-To: <20240216110313.17039-8-philmd@linaro.org>

On Fri, Feb 16, 2024 at 12:02:58PM +0100, Philippe Mathieu-Daudé wrote:
> Date: Fri, 16 Feb 2024 12:02:58 +0100
> From: Philippe Mathieu-Daudé <philmd@linaro.org>
> Subject: [PATCH 07/21] target: Replace DEVICE(object_new) -> qdev_new()
> X-Mailer: git-send-email 2.41.0
> 
> Prefer QDev API for QDev objects, avoid the underlying QOM layer.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  target/mips/cpu.c   | 2 +-
>  target/xtensa/cpu.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>

> 
> diff --git a/target/mips/cpu.c b/target/mips/cpu.c
> index d644adbc77..6b3909ee08 100644
> --- a/target/mips/cpu.c
> +++ b/target/mips/cpu.c
> @@ -649,7 +649,7 @@ MIPSCPU *mips_cpu_create_with_clock(const char *cpu_type, Clock *cpu_refclk)
>  {
>      DeviceState *cpu;
>  
> -    cpu = DEVICE(object_new(cpu_type));
> +    cpu = qdev_new(cpu_type);
>      qdev_connect_clock_in(cpu, "clk-in", cpu_refclk);
>      qdev_realize(cpu, NULL, &error_abort);
>  
> diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c
> index 79f91819df..4f9408e1a0 100644
> --- a/target/xtensa/cpu.c
> +++ b/target/xtensa/cpu.c
> @@ -205,7 +205,7 @@ XtensaCPU *xtensa_cpu_create_with_clock(const char *cpu_type, Clock *cpu_refclk)
>  {
>      DeviceState *cpu;
>  
> -    cpu = DEVICE(object_new(cpu_type));
> +    cpu = qdev_new(cpu_type);
>      qdev_connect_clock_in(cpu, "clk-in", cpu_refclk);
>      qdev_realize(cpu, NULL, &error_abort);
>  
> -- 
> 2.41.0
> 
> 


  reply	other threads:[~2024-02-22  9:41 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-16 11:02 [PATCH 00/21] hw: More QDev cleanups Philippe Mathieu-Daudé
2024-02-16 11:02 ` [PATCH 01/21] hw/i386/pc: Do not use C99 mixed-declarations style Philippe Mathieu-Daudé
2024-02-22  9:12   ` Zhao Liu
2024-02-22 10:10     ` Philippe Mathieu-Daudé
2024-02-16 11:02 ` [PATCH 02/21] hw/i386/pc_sysfw: Use qdev_is_realized() instead of QOM API Philippe Mathieu-Daudé
2024-02-22  9:16   ` Zhao Liu
2024-02-16 11:02 ` [PATCH 03/21] hw/ppc/spapr_cpu: " Philippe Mathieu-Daudé
2024-02-22  9:56   ` Zhao Liu
2024-02-16 11:02 ` [PATCH 04/21] hw/tricore/testboard: Use qdev_new() instead of QOM basic API Philippe Mathieu-Daudé
2024-02-19 11:59   ` Bastian Koppelmann
2024-02-16 11:02 ` [PATCH 05/21] hw/ppc/pnv_bmc: Use qdev_new() instead of QOM API Philippe Mathieu-Daudé
2024-02-16 11:08   ` Cédric Le Goater
2024-02-16 11:02 ` [PATCH 06/21] hw: Replace DEVICE(object_new) -> qdev_new() Philippe Mathieu-Daudé
2024-02-22  9:50   ` Zhao Liu
2024-02-16 11:02 ` [PATCH 07/21] target: " Philippe Mathieu-Daudé
2024-02-22  9:54   ` Zhao Liu [this message]
2024-02-16 11:02 ` [PATCH 08/21] hw/isa: Inline isa_try_new() Philippe Mathieu-Daudé
2024-02-16 11:03 ` [PATCH 09/21] hw/usb: Inline usb_try_new() Philippe Mathieu-Daudé
2024-02-22  9:53   ` Zhao Liu
2024-02-16 11:03 ` [PATCH 10/21] hw/usb: Inline usb_new() Philippe Mathieu-Daudé
2024-02-22  9:55   ` Zhao Liu
2024-02-16 11:03 ` [PATCH 11/21] hw/usb: Add QOM parentship relation with hub devices Philippe Mathieu-Daudé
2024-02-22  9:49   ` Zhao Liu
2024-02-16 11:03 ` [PATCH 12/21] hw/pci-host/q35: Update q35_host_props[] comment Philippe Mathieu-Daudé
2024-02-16 11:03 ` [PATCH 13/21] hw/pci-host/raven: Embedded OrIRQ in PRePPCIState Philippe Mathieu-Daudé
2024-02-16 11:03 ` [PATCH 14/21] hw/pci-host/raven: Prefer object_initialize_child over object_initialize Philippe Mathieu-Daudé
2024-02-16 11:03 ` [PATCH 15/21] hw/core/register: " Philippe Mathieu-Daudé
2024-02-16 11:03 ` [PATCH 16/21] hw/net/can/versal: " Philippe Mathieu-Daudé
2024-02-23 11:06   ` Francisco Iglesias
2024-02-23 12:23     ` Pavel Pisa via
2025-08-21 13:33   ` Peter Maydell
2024-02-16 11:03 ` [PATCH 17/21] hw/i386/iommu: " Philippe Mathieu-Daudé
2024-02-22  9:24   ` Zhao Liu
2024-02-16 11:03 ` [PATCH 18/21] hw/pci-host/versatile: Replace object_initialize() -> _child() Philippe Mathieu-Daudé
2024-02-16 11:03 ` [PATCH 19/21] hw/s390x/zpci-bus: Add QOM parentship relation with zPCI devices Philippe Mathieu-Daudé
2024-02-19 13:38   ` Thomas Huth
2024-02-19 14:37     ` Philippe Mathieu-Daudé
2024-02-16 11:03 ` [PATCH 20/21] hw/arm/mps2: Add QOM parentship relation with OR IRQ gates Philippe Mathieu-Daudé
2024-02-16 11:03 ` [PATCH 21/21] hw: Add QOM parentship relation with CPUs Philippe Mathieu-Daudé
2024-02-22  9:59   ` Zhao Liu
2025-01-12 17:23 ` [PATCH 00/21] hw: More QDev cleanups Philippe Mathieu-Daudé

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=ZdcZ4TPGX9ZJ0GRL@intel.com \
    --to=zhao1.liu@intel.com \
    --cc=aleksandar.rikalo@syrmia.com \
    --cc=aurelien@aurel32.net \
    --cc=jcmvbkbc@gmail.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-s390x@nongnu.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).