All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] target/avr/cpu: Use device_class_set_parent_realize()
@ 2021-02-01  8:03 Philippe Mathieu-Daudé
  2021-02-03  2:07 ` Richard Henderson
  2021-02-13 23:33 ` Laurent Vivier
  0 siblings, 2 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-02-01  8:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Sarah Harris, Michael Rolnik, Philippe Mathieu-Daudé

Change generated automatically using the Coccinelle
patch included in commit bf853881690 ("qdev: use
device_class_set_parent_realize/unrealize/reset()")

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/avr/cpu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/target/avr/cpu.c b/target/avr/cpu.c
index 6f3d5a9e4a7..e60036e41ef 100644
--- a/target/avr/cpu.c
+++ b/target/avr/cpu.c
@@ -190,9 +190,7 @@ static void avr_cpu_class_init(ObjectClass *oc, void *data)
     CPUClass *cc = CPU_CLASS(oc);
     AVRCPUClass *mcc = AVR_CPU_CLASS(oc);
 
-    mcc->parent_realize = dc->realize;
-    dc->realize = avr_cpu_realizefn;
-
+    device_class_set_parent_realize(dc, avr_cpu_realizefn, &mcc->parent_realize);
     device_class_set_parent_reset(dc, avr_cpu_reset, &mcc->parent_reset);
 
     cc->class_by_name = avr_cpu_class_by_name;
-- 
2.26.2



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

* Re: [PATCH] target/avr/cpu: Use device_class_set_parent_realize()
  2021-02-01  8:03 [PATCH] target/avr/cpu: Use device_class_set_parent_realize() Philippe Mathieu-Daudé
@ 2021-02-03  2:07 ` Richard Henderson
  2021-02-13 23:33 ` Laurent Vivier
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2021-02-03  2:07 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: qemu-trivial, Sarah Harris, Michael Rolnik

On 1/31/21 10:03 PM, Philippe Mathieu-Daudé wrote:
> Change generated automatically using the Coccinelle
> patch included in commit bf853881690 ("qdev: use
> device_class_set_parent_realize/unrealize/reset()")
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  target/avr/cpu.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


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

* Re: [PATCH] target/avr/cpu: Use device_class_set_parent_realize()
  2021-02-01  8:03 [PATCH] target/avr/cpu: Use device_class_set_parent_realize() Philippe Mathieu-Daudé
  2021-02-03  2:07 ` Richard Henderson
@ 2021-02-13 23:33 ` Laurent Vivier
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2021-02-13 23:33 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: qemu-trivial, Sarah Harris, Michael Rolnik

Le 01/02/2021 à 09:03, Philippe Mathieu-Daudé a écrit :
> Change generated automatically using the Coccinelle
> patch included in commit bf853881690 ("qdev: use
> device_class_set_parent_realize/unrealize/reset()")
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  target/avr/cpu.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/target/avr/cpu.c b/target/avr/cpu.c
> index 6f3d5a9e4a7..e60036e41ef 100644
> --- a/target/avr/cpu.c
> +++ b/target/avr/cpu.c
> @@ -190,9 +190,7 @@ static void avr_cpu_class_init(ObjectClass *oc, void *data)
>      CPUClass *cc = CPU_CLASS(oc);
>      AVRCPUClass *mcc = AVR_CPU_CLASS(oc);
>  
> -    mcc->parent_realize = dc->realize;
> -    dc->realize = avr_cpu_realizefn;
> -
> +    device_class_set_parent_realize(dc, avr_cpu_realizefn, &mcc->parent_realize);
>      device_class_set_parent_reset(dc, avr_cpu_reset, &mcc->parent_reset);
>  
>      cc->class_by_name = avr_cpu_class_by_name;
> 


Applied to my trivial-patches branch.

Thanks,
Laurent


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

end of thread, other threads:[~2021-02-13 23:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-01  8:03 [PATCH] target/avr/cpu: Use device_class_set_parent_realize() Philippe Mathieu-Daudé
2021-02-03  2:07 ` Richard Henderson
2021-02-13 23:33 ` Laurent Vivier

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.