Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests dma: fix compile error for dma_map_benchmark

When building selftests/dma:
$ make -C tools/testing/selftests TARGETS=dma
I hit the following compilation error:

dma_map_benchmark.c:13:10: fatal error: linux/map_benchmark.h: No such file or directory
#include <linux/map_benchmark.h>
^~~~~~~~~~~~~~~~~~~~~~~

dma/Makefile does not include the map_benchmark.h path, so add
more including path, and fix include order in dma_map_benchmark.c

Fixes: 8ddde07a3d28 ("dma-mapping: benchmark: extract a common header file for map_benchmark definition")
Signed-off-by: Yu Liao <liaoyu15@huawei.com>
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

authored by

Yu Liao and committed by
Shuah Khan
12a29115 795285ef

+2 -1
+1
tools/testing/selftests/dma/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 CFLAGS += -I../../../../usr/include/ 3 + CFLAGS += -I../../../../include/ 3 4 4 5 TEST_GEN_PROGS := dma_map_benchmark 5 6
+1 -1
tools/testing/selftests/dma/dma_map_benchmark.c
··· 10 10 #include <unistd.h> 11 11 #include <sys/ioctl.h> 12 12 #include <sys/mman.h> 13 - #include <linux/map_benchmark.h> 14 13 #include <linux/types.h> 14 + #include <linux/map_benchmark.h> 15 15 16 16 #define NSEC_PER_MSEC 1000000L 17 17