Skip to content

Commit c7172cf

Browse files
nathanchancegregkh
authored andcommitted
libnvdimm/nfit_test: Fix acpi_handle redefinition
[ Upstream commit 59f0889 ] After commit 62974fc ("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: ClangBuiltLinux/linux#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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 410d268 commit c7172cf

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎tools/testing/nvdimm/test/nfit_test.h‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55
#ifndef __NFIT_TEST_H__
66
#define __NFIT_TEST_H__
7+
#include <linux/acpi.h>
78
#include <linux/list.h>
89
#include <linux/uuid.h>
910
#include <linux/ioport.h>
@@ -202,9 +203,6 @@ struct nd_intel_lss {
202203
__u32 status;
203204
} __packed;
204205

205-
union acpi_object;
206-
typedef void *acpi_handle;
207-
208206
typedef struct nfit_test_resource *(*nfit_test_lookup_fn)(resource_size_t);
209207
typedef union acpi_object *(*nfit_test_evaluate_dsm_fn)(acpi_handle handle,
210208
const guid_t *guid, u64 rev, u64 func,

0 commit comments

Comments
 (0)