qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: qemu-devel@nongnu.org, rjones@redhat.com, pbonzini@redhat.com,
	somlo@cmu.edu, lersek@redhat.com, mst@redhat.com,
	ehabkost@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/6] fw_cfg: move qdev_init_nofail() out from fw_cfg_init1() into callers
Date: Mon, 12 Jun 2017 13:43:28 +0200	[thread overview]
Message-ID: <20170612134328.76c5a352@nial.brq.redhat.com> (raw)
In-Reply-To: <1497097821-32754-3-git-send-email-mark.cave-ayland@ilande.co.uk>

On Sat, 10 Jun 2017 13:30:17 +0100
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> wrote:

patch needs a commit message saying why it's needed.
maybe add something similar to:

qdev_init_nofail() essentially 'realizes' object,
taking in account that fw_cfg_init1() will be moved to
realize in follow up patches, move qdev_init_nofail() outside of
fw_cfg_init1().



> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
>  hw/nvram/fw_cfg.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
> index 144e0c6..1313bfd 100644
> --- a/hw/nvram/fw_cfg.c
> +++ b/hw/nvram/fw_cfg.c
> @@ -919,8 +919,6 @@ static void fw_cfg_init1(DeviceState *dev)
>  
>      object_property_add_child(OBJECT(machine), FW_CFG_NAME, OBJECT(s), NULL);
>  
> -    qdev_init_nofail(dev);
> -
>      fw_cfg_add_bytes(s, FW_CFG_SIGNATURE, (char *)"QEMU", 4);
>      fw_cfg_add_bytes(s, FW_CFG_UUID, &qemu_uuid, 16);
>      fw_cfg_add_i16(s, FW_CFG_NOGRAPHIC, (uint16_t)!machine->enable_graphics);
> @@ -948,6 +946,8 @@ FWCfgState *fw_cfg_init_io_dma(uint32_t iobase, uint32_t dma_iobase,
>      }
>  
>      fw_cfg_init1(dev);
> +    qdev_init_nofail(dev);
> +
>      s = FW_CFG(dev);
>  
>      if (s->dma_enabled) {
> @@ -985,6 +985,7 @@ FWCfgState *fw_cfg_init_mem_wide(hwaddr ctl_addr,
>      }
>  
>      fw_cfg_init1(dev);
> +    qdev_init_nofail(dev);
>  
>      sbd = SYS_BUS_DEVICE(dev);
>      sysbus_mmio_map(sbd, 0, ctl_addr);

  reply	other threads:[~2017-06-12 11:43 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-10 12:30 [Qemu-devel] [PATCH 0/6] fw_cfg: qdev-related tidy-ups Mark Cave-Ayland
2017-06-10 12:30 ` [Qemu-devel] [PATCH 1/6] fw_cfg: move initialisation of FWCfgState into instance_init Mark Cave-Ayland
2017-06-10 18:05   ` Philippe Mathieu-Daudé
2017-06-12 11:20   ` Igor Mammedov
2017-06-12 11:45     ` Mark Cave-Ayland
2017-06-12 18:27       ` Laszlo Ersek
2017-06-12 18:46         ` Mark Cave-Ayland
2017-06-10 12:30 ` [Qemu-devel] [PATCH 2/6] fw_cfg: move qdev_init_nofail() out from fw_cfg_init1() into callers Mark Cave-Ayland
2017-06-12 11:43   ` Igor Mammedov [this message]
2017-06-12 11:54     ` Mark Cave-Ayland
2017-06-12 19:15       ` Laszlo Ersek
2017-06-12 19:50         ` Mark Cave-Ayland
2017-06-12 21:11           ` Mark Cave-Ayland
2017-06-10 12:30 ` [Qemu-devel] [PATCH 3/6] fw_cfg: move setting of FW_CFG_ID into fw_cfg_init1() Mark Cave-Ayland
2017-06-10 18:07   ` Philippe Mathieu-Daudé
2017-06-12 11:37   ` Igor Mammedov
2017-06-12 11:49     ` Mark Cave-Ayland
2017-06-12 13:03     ` Gerd Hoffmann
2017-06-10 12:30 ` [Qemu-devel] [PATCH 4/6] fw_cfg: move fw_cfg_init1() into the fw_cfg_*_realize() functions Mark Cave-Ayland
2017-06-12 12:03   ` Igor Mammedov
2017-06-10 12:30 ` [Qemu-devel] [PATCH 5/6] fw_cfg: use sysbus_init_mmio() in fw_cfg_io_realize() Mark Cave-Ayland
2017-06-12 12:16   ` Igor Mammedov
2017-06-12 12:59     ` Mark Cave-Ayland
2017-06-10 12:30 ` [Qemu-devel] [PATCH 6/6] fw_cfg: move QOM type defines into fw_cfg.h Mark Cave-Ayland
2017-06-10 17:43   ` Philippe Mathieu-Daudé
2017-06-10 18:15 ` [Qemu-devel] [PATCH 0/6] fw_cfg: qdev-related tidy-ups Philippe Mathieu-Daudé
2017-06-11 15:00   ` Mark Cave-Ayland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170612134328.76c5a352@nial.brq.redhat.com \
    --to=imammedo@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.com \
    --cc=somlo@cmu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).