qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Eduardo Habkost" <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	qemu-trivial@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"John Snow" <jsnow@redhat.com>,
	"Richard Henderson" <rth@twiddle.net>
Subject: [PATCH v2 16/18] hw/i386: Include "hw/mem/nvdimm.h"
Date: Fri, 28 Feb 2020 12:46:47 +0100	[thread overview]
Message-ID: <20200228114649.12818-17-philmd@redhat.com> (raw)
In-Reply-To: <20200228114649.12818-1-philmd@redhat.com>

All this files use methods/definitions declared in the NVDIMM
device header. Include it.

This fixes (when modifying unrelated headers):

  hw/i386/acpi-build.c:2733:9: error: implicit declaration of function 'nvdimm_build_acpi' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        nvdimm_build_acpi(table_offsets, tables_blob, tables->linker,
        ^
  hw/i386/pc.c:1996:61: error: use of undeclared identifier 'TYPE_NVDIMM'
    const bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM);
                                                            ^
  hw/i386/pc.c:2032:55: error: use of undeclared identifier 'TYPE_NVDIMM'
    bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM);
                                                      ^
  hw/i386/pc.c:2040:9: error: implicit declaration of function 'nvdimm_plug' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        nvdimm_plug(ms->nvdimms_state);
        ^
  hw/i386/pc.c:2040:9: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
        nvdimm_plug(ms->nvdimms_state);
        ^
  hw/i386/pc.c:2065:42: error: use of undeclared identifier 'TYPE_NVDIMM'
    if (object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM)) {
                                         ^
  hw/i386/pc_i440fx.c:307:9: error: implicit declaration of function 'nvdimm_init_acpi_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        nvdimm_init_acpi_state(machine->nvdimms_state, system_io,
        ^
  hw/i386/pc_q35.c:332:9: error: implicit declaration of function 'nvdimm_init_acpi_state' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        nvdimm_init_acpi_state(machine->nvdimms_state, system_io,
        ^

Acked-by: John Snow <jsnow@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/i386/acpi-build.c | 1 +
 hw/i386/pc.c         | 1 +
 hw/i386/pc_piix.c    | 1 +
 hw/i386/pc_q35.c     | 1 +
 4 files changed, 4 insertions(+)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 9c4e46fa74..9335a82e9f 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -47,6 +47,7 @@
 #include "hw/rtc/mc146818rtc_regs.h"
 #include "migration/vmstate.h"
 #include "hw/mem/memory-device.h"
+#include "hw/mem/nvdimm.h"
 #include "sysemu/numa.h"
 #include "sysemu/reset.h"
 
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 6ab4acb0c6..362eb2a180 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -76,6 +76,7 @@
 #include "hw/boards.h"
 #include "acpi-build.h"
 #include "hw/mem/pc-dimm.h"
+#include "hw/mem/nvdimm.h"
 #include "qapi/error.h"
 #include "qapi/qapi-visit-common.h"
 #include "qapi/visitor.h"
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index fa12203079..82f1693901 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -60,6 +60,7 @@
 #include "migration/global_state.h"
 #include "migration/misc.h"
 #include "sysemu/numa.h"
+#include "hw/mem/nvdimm.h"
 
 #define MAX_IDE_BUS 2
 
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 84cf925cf4..d37c425e22 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -53,6 +53,7 @@
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "sysemu/numa.h"
+#include "hw/mem/nvdimm.h"
 
 /* ICH9 AHCI has 6 ports */
 #define MAX_SATA_PORTS     6
-- 
2.21.1



  parent reply	other threads:[~2020-02-28 12:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 11:46 [PATCH v2 00/18] hw: Clean up hw/i386 headers (and few alpha/hppa) Philippe Mathieu-Daudé
2020-02-28 11:46 ` [PATCH v2 01/18] vl: Add missing "hw/boards.h" include Philippe Mathieu-Daudé
2020-02-28 11:46 ` [PATCH v2 02/18] hw/southbridge/ich9: Removed unused headers Philippe Mathieu-Daudé
2020-02-28 11:46 ` [PATCH v2 03/18] hw/i386/ioapic_internal: Remove unused "hw/i386/ioapic.h" header Philippe Mathieu-Daudé
2020-02-28 11:46 ` [PATCH v2 04/18] hw/timer: Remove unused "ui/console.h" header Philippe Mathieu-Daudé
2020-02-28 11:46 ` [PATCH v2 05/18] hw/usb/dev-storage: " Philippe Mathieu-Daudé
2020-02-28 13:19   ` Gerd Hoffmann
2020-02-28 11:46 ` [PATCH v2 06/18] hw/i386/intel_iommu: Remove unused includes Philippe Mathieu-Daudé
2020-02-28 11:46 ` [PATCH v2 07/18] hw/alpha/alpha_sys: Remove unused "hw/ide.h" header Philippe Mathieu-Daudé
2020-02-28 11:46 ` [PATCH v2 08/18] hw/alpha/dp264: Include "net/net.h" Philippe Mathieu-Daudé
2020-02-28 11:46 ` [PATCH v2 09/18] hw/hppa/machine: " Philippe Mathieu-Daudé
2020-02-28 11:46 ` [PATCH v2 10/18] hw/acpi/cpu_hotplug: Include "hw/pci/pci.h" Philippe Mathieu-Daudé
2020-02-28 11:46 ` [PATCH v2 11/18] hw/timer/hpet: Include "exec/address-spaces.h" Philippe Mathieu-Daudé
2020-02-28 11:46 ` [PATCH v2 12/18] hw/pci-host/q35: Include "qemu/range.h" Philippe Mathieu-Daudé
2020-02-28 11:46 ` [PATCH v2 13/18] hw/i2c/smbus_ich9: " Philippe Mathieu-Daudé
2020-02-28 11:46 ` [PATCH v2 14/18] hw/pci-host/piix: " Philippe Mathieu-Daudé
2020-02-28 11:46 ` [PATCH v2 15/18] hw/acpi: Include "hw/mem/nvdimm.h" Philippe Mathieu-Daudé
2020-02-28 11:46 ` Philippe Mathieu-Daudé [this message]
2020-02-28 11:46 ` [PATCH v2 17/18] hw/pci-host/q35: Remove unused includes Philippe Mathieu-Daudé
2020-02-28 11:46 ` [PATCH v2 18/18] hw/i386/pc: Clean up includes Philippe Mathieu-Daudé
2020-02-29 19:53 ` [PATCH v2 00/18] hw: Clean up hw/i386 headers (and few alpha/hppa) Richard Henderson
2020-03-09 11:56 ` Laurent Vivier

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=20200228114649.12818-17-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=rth@twiddle.net \
    /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).