qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>, "Michael S . Tsirkin" <mst@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	Igor Mammedov <imammedo@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Drew Jones <drjones@redhat.com>, Wei Huang <wei@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/6] hw/arm/virt: Remove null-check in virt_build_smbios()
Date: Tue, 5 Mar 2019 22:01:35 +0100	[thread overview]
Message-ID: <5c595af2-e9c6-61eb-ab83-bdbc59b37967@redhat.com> (raw)
In-Reply-To: <b7a09e97-093e-6e27-4c7f-cc5244d63726@redhat.com>

Hi Laszlo,

On 12/10/18 5:02 PM, Laszlo Ersek wrote:
> On 12/07/18 18:03, Philippe Mathieu-Daudé wrote:
>> Since af1f60a4022, the fw_cfg field is always created in machvirt_init().
>> There is no need to null check it.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>  hw/arm/virt.c | 4 ----
>>  1 file changed, 4 deletions(-)
>>
>> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
>> index f69e7eb399..36303ed59c 100644
>> --- a/hw/arm/virt.c
>> +++ b/hw/arm/virt.c
>> @@ -1279,10 +1279,6 @@ static void virt_build_smbios(VirtMachineState *vms)
>>      size_t smbios_tables_len, smbios_anchor_len;
>>      const char *product = "QEMU Virtual Machine";
>>  
>> -    if (!vms->fw_cfg) {
>> -        return;
>> -    }
>> -
>>      if (kvm_enabled()) {
>>          product = "KVM Virtual Machine";
>>      }
>>
> 
> This patch looks correct to me; however, the fact that fw_cfg is always
> present on the virt board does not seem related to commit af1f60a4022
> af1f60a40226 ("hw/arm/virt: remove VirtGuestInfo", 2017-01-09). Said
> commit only flattened the contents of VirtGuestInfo into
> VirtMachineState; the conditions under which fw_cfg would be created
> were not changed.

This is certainly not related to commit af1f60a4022... This is not the
commit I remember I wanted to refer to, I suppose I did a copy/paste
mistake, thanks for carefully reviewing me and catching this!

> As far as I can see (from a number of git-blame / git-show commands),
> fw_cfg was added unconditionally to the virt board in commit
> 578f3c7b0835 ("arm: add fw_cfg to "virt" board", 2014-12-22). And the
> check that you are now (correctly) removing has always been superfluous
> -- it was superfluous already when it was first added in commit
> c30e15658b1b ("smbios: implement smbios support for mach-virt", 2015-09-07).
> 
> As far as I can tell, anyway.
> 
> If you agree, I suggest mentioning commit c30e15658b1b in the commit
> message, rather than commit af1f60a4022.

Yes, this one makes more sense ;)

> 
> With such an update:
> 
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Thanks!

Phil.

> 
> Thanks
> Laszlo
> 

  reply	other threads:[~2019-03-05 21:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-07 17:03 [Qemu-devel] [PATCH 0/6] fw_cfg: add HMP 'info fw_cfg' and add_file_from_host() Philippe Mathieu-Daudé
2018-12-07 17:03 ` [Qemu-devel] [PATCH 1/6] hw/arm/virt: Remove null-check in virt_build_smbios() Philippe Mathieu-Daudé
2018-12-10 16:02   ` Laszlo Ersek
2019-03-05 21:01     ` Philippe Mathieu-Daudé [this message]
2018-12-07 17:03 ` [Qemu-devel] [PATCH 2/6] hw/arm: Remove unused include Philippe Mathieu-Daudé
2018-12-07 17:57   ` Michael S. Tsirkin
2018-12-10  9:14     ` Philippe Mathieu-Daudé
2018-12-07 17:03 ` [Qemu-devel] [PATCH 3/6] hw/i386: " Philippe Mathieu-Daudé
2018-12-07 17:43   ` Michael S. Tsirkin
2018-12-07 17:03 ` [Qemu-devel] [PATCH 4/6] hw/nvram/fw_cfg: Add trace events Philippe Mathieu-Daudé
2018-12-07 17:44   ` Michael S. Tsirkin
2018-12-10 16:10   ` Laszlo Ersek
2018-12-10 16:33     ` Philippe Mathieu-Daudé
2018-12-07 17:03 ` [Qemu-devel] [PATCH 5/6] hw/nvram/fw_cfg: Add HMP 'info fw_cfg' command Philippe Mathieu-Daudé
2018-12-07 17:26   ` Eric Blake
2018-12-07 17:54   ` Michael S. Tsirkin
2018-12-10  9:18     ` Philippe Mathieu-Daudé
2018-12-18 15:14       ` Philippe Mathieu-Daudé
2018-12-10 11:42   ` Dr. David Alan Gilbert
2018-12-10 16:49   ` Laszlo Ersek
2018-12-07 17:04 ` [Qemu-devel] [PATCH 6/6] hw/nvram/fw_cfg: Add fw_cfg_add_file_from_host() Philippe Mathieu-Daudé
2018-12-07 17:56   ` Michael S. Tsirkin
2018-12-07 19:17     ` Philippe Mathieu-Daudé
2018-12-10 17:11   ` Laszlo Ersek
2018-12-07 22:48 ` [Qemu-devel] [PATCH 0/6] fw_cfg: add HMP 'info fw_cfg' and add_file_from_host() no-reply
2018-12-10  9:22   ` Philippe Mathieu-Daudé

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=5c595af2-e9c6-61eb-ab83-bdbc59b37967@redhat.com \
    --to=philmd@redhat.com \
    --cc=drjones@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=wei@redhat.com \
    /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).