blob: 0f8417ddb76f7640b8b3161c016f38571b71bb3f [file] [log] [blame]
From a7680b6875f89be5677ee5ecdff18f9f81eaff69 Mon Sep 17 00:00:00 2001
From: Nathan Chancellor <>
Date: Tue, 17 Sep 2019 21:21:49 -0700
Subject: [PATCH] libnvdimm/nfit_test: Fix acpi_handle redefinition
commit 59f08896f058a92f03a0041b397a1a227c5e8529 upstream.
After commit 62974fc389b3 ("libnvdimm: Enable unit test infrastructure
compile checks"), clang warns:
In file included from
warning: redefinition of typedef 'acpi_handle' is a C11 feature
typedef void *acpi_handle;
../include/acpi/actypes.h:424:15: note: previous definition is here
typedef void *acpi_handle; /* Actually a ptr to a NS Node */
1 warning generated.
The include chain:
iomap.c ->
linux/acpi.h ->
acpi/acpi.h ->
Avoid this by including linux/acpi.h in nfit_test.h, which allows us to
remove both the typedef and the forward declaration of acpi_object.
Signed-off-by: Nathan Chancellor <>
Reviewed-by: Ira Weiny <>
Signed-off-by: Dan Williams <>
Signed-off-by: Paul Gortmaker <>
diff --git a/tools/testing/nvdimm/test/nfit_test.h b/tools/testing/nvdimm/test/nfit_test.h
index 448d686da8b1..0bf5640f1f07 100644
--- a/tools/testing/nvdimm/test/nfit_test.h
+++ b/tools/testing/nvdimm/test/nfit_test.h
@@ -4,6 +4,7 @@
#ifndef __NFIT_TEST_H__
#define __NFIT_TEST_H__
+#include <linux/acpi.h>
#include <linux/list.h>
#include <linux/uuid.h>
#include <linux/ioport.h>
@@ -202,9 +203,6 @@ struct nd_intel_lss {
__u32 status;
} __packed;
-union acpi_object;
-typedef void *acpi_handle;
typedef struct nfit_test_resource *(*nfit_test_lookup_fn)(resource_size_t);
typedef union acpi_object *(*nfit_test_evaluate_dsm_fn)(acpi_handle handle,
const guid_t *guid, u64 rev, u64 func,