diff options
author | Nathan Chancellor <natechancellor@gmail.com> | 2019-09-18 00:21:49 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2019-09-24 13:24:18 -0400 |
commit | 59f08896f058a92f03a0041b397a1a227c5e8529 (patch) | |
tree | 80ba1167b04883c37760a82e58bff8606ed38665 /tools | |
parent | cf387d9644d8c78721cf9b77af9f67bb5b04da16 (diff) |
libnvdimm/nfit_test: Fix acpi_handle redefinition
After commit 62974fc389b3 ("libnvdimm: Enable unit test infrastructure
compile checks"), clang warns:
In file included from
../drivers/nvdimm/../../tools/testing/nvdimm/test/iomap.c:15:
../drivers/nvdimm/../../tools/testing/nvdimm/test/nfit_test.h:206:15:
warning: redefinition of typedef 'acpi_handle' is a C11 feature
[-Wtypedef-redefinition]
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 ->
acpi/actypes.h
nfit_test.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.
Link: https://github.com/ClangBuiltLinux/linux/issues/660
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/20190918042148.77553-1-natechancellor@gmail.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/nvdimm/test/nfit_test.h | 4 |
1 files changed, 1 insertions, 3 deletions
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 @@ | |||
4 | */ | 4 | */ |
5 | #ifndef __NFIT_TEST_H__ | 5 | #ifndef __NFIT_TEST_H__ |
6 | #define __NFIT_TEST_H__ | 6 | #define __NFIT_TEST_H__ |
7 | #include <linux/acpi.h> | ||
7 | #include <linux/list.h> | 8 | #include <linux/list.h> |
8 | #include <linux/uuid.h> | 9 | #include <linux/uuid.h> |
9 | #include <linux/ioport.h> | 10 | #include <linux/ioport.h> |
@@ -202,9 +203,6 @@ struct nd_intel_lss { | |||
202 | __u32 status; | 203 | __u32 status; |
203 | } __packed; | 204 | } __packed; |
204 | 205 | ||
205 | union acpi_object; | ||
206 | typedef void *acpi_handle; | ||
207 | |||
208 | typedef struct nfit_test_resource *(*nfit_test_lookup_fn)(resource_size_t); | 206 | typedef struct nfit_test_resource *(*nfit_test_lookup_fn)(resource_size_t); |
209 | typedef union acpi_object *(*nfit_test_evaluate_dsm_fn)(acpi_handle handle, | 207 | typedef union acpi_object *(*nfit_test_evaluate_dsm_fn)(acpi_handle handle, |
210 | const guid_t *guid, u64 rev, u64 func, | 208 | const guid_t *guid, u64 rev, u64 func, |