diff mbox

[2/6] hw/s390x/css: Use type_init() instead of machine_init()

Message ID 1442677004-4482-3-git-send-email-afaerber@suse.de
State New
Headers show

Commit Message

Andreas Färber Sept. 19, 2015, 3:36 p.m. UTC
Here, machine_init() is being misused to initialize global variables.
Being all local, it's safe to use the slightly earlier type_init().

This prepares for dropping machine_init().

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 hw/s390x/css.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christian Borntraeger Sept. 21, 2015, 8:04 a.m. UTC | #1
Am 19.09.2015 um 17:36 schrieb Andreas Färber:
> Here, machine_init() is being misused to initialize global variables.
> Being all local, it's safe to use the slightly earlier type_init().
> 
> This prepares for dropping machine_init().
> 
> Signed-off-by: Andreas Färber <afaerber@suse.de>

Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>

I think this should go via your tree to coordinate with machine_init removal.



> ---
>  hw/s390x/css.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/s390x/css.c b/hw/s390x/css.c
> index c033612..d164fa8 100644
> --- a/hw/s390x/css.c
> +++ b/hw/s390x/css.c
> @@ -1509,7 +1509,7 @@ static void css_init(void)
>      channel_subsys->chnmon_active = false;
>      QTAILQ_INIT(&channel_subsys->io_adapters);
>  }
> -machine_init(css_init);
> +type_init(css_init)
> 
>  void css_reset_sch(SubchDev *sch)
>  {
>
diff mbox

Patch

diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index c033612..d164fa8 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -1509,7 +1509,7 @@  static void css_init(void)
     channel_subsys->chnmon_active = false;
     QTAILQ_INIT(&channel_subsys->io_adapters);
 }
-machine_init(css_init);
+type_init(css_init)
 
 void css_reset_sch(SubchDev *sch)
 {