[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 08/15] hw/timer/arm_timer: Rename arm_timer_init() -> arm_tim
From: |
Peter Maydell |
Subject: |
Re: [PATCH 08/15] hw/timer/arm_timer: Rename arm_timer_init() -> arm_timer_new() |
Date: |
Thu, 8 Jun 2023 15:49:32 +0100 |
On Wed, 31 May 2023 at 21:36, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> QDev models often use foo_new() as the combination of
> foo_init() + foo_realize(). Here arm_timer_init() is
> a such combination, so rename it as arm_timer_new() to
> emphasis the returned device is already realized.
The other convention is that foo_new() does allocate-and-init
and foo_init() is init-in-place. But we get to the same
place either way.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
(It would be nice to do in-place rather than the
allocation here at some point.)
thanks
-- PMM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH 08/15] hw/timer/arm_timer: Rename arm_timer_init() -> arm_timer_new(),
Peter Maydell <=