qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [PULL 44/45] net: xgmac: convert SysBus init method to a


From: David Gibson
Subject: Re: [Qemu-arm] [PULL 44/45] net: xgmac: convert SysBus init method to a realize method
Date: Tue, 23 Oct 2018 16:26:40 +0100
User-agent: Mutt/1.10.1 (2018-07-13)

On Thu, Oct 18, 2018 at 05:04:21PM -0300, Eduardo Habkost wrote:
> From: Cédric Le Goater <address@hidden>
> 
> Cc: Peter Maydell <address@hidden>
> Cc: address@hidden
> Cc: Rob Herring <address@hidden>
> Signed-off-by: Cédric Le Goater <address@hidden>
> Reviewed-by: Peter Maydell <address@hidden>
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> Message-Id: <address@hidden>
> Signed-off-by: Eduardo Habkost <address@hidden>

Reviewed-by: David Gibson <address@hidden>

> ---
>  hw/net/xgmac.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/hw/net/xgmac.c b/hw/net/xgmac.c
> index fa001563d3..63f5a62ebf 100644
> --- a/hw/net/xgmac.c
> +++ b/hw/net/xgmac.c
> @@ -374,9 +374,9 @@ static NetClientInfo net_xgmac_enet_info = {
>      .receive = eth_rx,
>  };
>  
> -static int xgmac_enet_init(SysBusDevice *sbd)
> +static void xgmac_enet_realize(DeviceState *dev, Error **errp)
>  {
> -    DeviceState *dev = DEVICE(sbd);
> +    SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
>      XgmacState *s = XGMAC(dev);
>  
>      memory_region_init_io(&s->iomem, OBJECT(s), &enet_mem_ops, s,
> @@ -397,8 +397,6 @@ static int xgmac_enet_init(SysBusDevice *sbd)
>                                   (s->conf.macaddr.a[2] << 16) |
>                                   (s->conf.macaddr.a[1] << 8) |
>                                    s->conf.macaddr.a[0];
> -
> -    return 0;
>  }
>  
>  static Property xgmac_properties[] = {
> @@ -408,10 +406,9 @@ static Property xgmac_properties[] = {
>  
>  static void xgmac_enet_class_init(ObjectClass *klass, void *data)
>  {
> -    SysBusDeviceClass *sbc = SYS_BUS_DEVICE_CLASS(klass);
>      DeviceClass *dc = DEVICE_CLASS(klass);
>  
> -    sbc->init = xgmac_enet_init;
> +    dc->realize = xgmac_enet_realize;
>      dc->vmsd = &vmstate_xgmac;
>      dc->props = xgmac_properties;
>  }

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]