All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hw/arm/mps2-tz: Use TYPE_IOTKIT instead of hardcoded string
@ 2020-04-28 15:46 Philippe Mathieu-Daudé
  2020-04-30 15:52 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-04-28 15:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Peter Maydell, qemu-arm, Philippe Mathieu-Daudé

By using the TYPE_* definitions for devices, we can:
 - quickly find where devices are used with 'git-grep'
 - easily rename a device (one-line change).

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/arm/mps2-tz.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c
index a8dea7dde1..2c43041564 100644
--- a/hw/arm/mps2-tz.c
+++ b/hw/arm/mps2-tz.c
@@ -395,7 +395,7 @@ static void mps2tz_common_init(MachineState *machine)
         exit(EXIT_FAILURE);
     }
 
-    sysbus_init_child_obj(OBJECT(machine), "iotkit", &mms->iotkit,
+    sysbus_init_child_obj(OBJECT(machine), TYPE_IOTKIT, &mms->iotkit,
                           sizeof(mms->iotkit), mmc->armsse_type);
     iotkitdev = DEVICE(&mms->iotkit);
     object_property_set_link(OBJECT(&mms->iotkit), OBJECT(system_memory),
-- 
2.21.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hw/arm/mps2-tz: Use TYPE_IOTKIT instead of hardcoded string
  2020-04-28 15:46 [PATCH] hw/arm/mps2-tz: Use TYPE_IOTKIT instead of hardcoded string Philippe Mathieu-Daudé
@ 2020-04-30 15:52 ` Peter Maydell
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2020-04-30 15:52 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: QEMU Trivial, qemu-arm, QEMU Developers

On Tue, 28 Apr 2020 at 16:46, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> By using the TYPE_* definitions for devices, we can:
>  - quickly find where devices are used with 'git-grep'
>  - easily rename a device (one-line change).
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/arm/mps2-tz.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)



Applied to target-arm.next, thanks.

-- PMM


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-30 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 15:46 [PATCH] hw/arm/mps2-tz: Use TYPE_IOTKIT instead of hardcoded string Philippe Mathieu-Daudé
2020-04-30 15:52 ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.