Skip to content

Commit c0e71d6

Browse files
jankaradjbw
authored andcommitted
tools/testing/nvdimm: Fix compilation failure without CONFIG_DEV_DAX_PMEM_COMPAT
When a kernel is configured without CONFIG_DEV_DAX_PMEM_COMPAT, the compilation of tools/testing/nvdimm fails with: Building modules, stage 2. MODPOST 11 modules ERROR: "dax_pmem_compat_test" [tools/testing/nvdimm/test/nfit_test.ko] undefined! Fix the problem by calling dax_pmem_compat_test() only if the kernel has the required functionality. Signed-off-by: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dan Williams <[email protected]>
1 parent b9bd803 commit c0e71d6

File tree

1 file changed

+2
-0
lines changed
  • tools/testing/nvdimm/test

1 file changed

+2
-0
lines changed

tools/testing/nvdimm/test/nfit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3164,7 +3164,9 @@ static __init int nfit_test_init(void)
31643164
mcsafe_test();
31653165
dax_pmem_test();
31663166
dax_pmem_core_test();
3167+
#ifdef CONFIG_DEV_DAX_PMEM_COMPAT
31673168
dax_pmem_compat_test();
3169+
#endif
31683170

31693171
nfit_test_setup(nfit_test_lookup, nfit_test_evaluate_dsm);
31703172

0 commit comments

Comments
 (0)