Skip to content

Commit

Permalink
selftests dma: fix compile error for dma_map_benchmark
Browse files Browse the repository at this point in the history
[ Upstream commit 12a2911 ]

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: 8ddde07 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
yuliao0214 authored and gregkh committed Jun 29, 2022
1 parent beacb32 commit d4b1216
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions tools/testing/selftests/dma/Makefile
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
CFLAGS += -I../../../../usr/include/
CFLAGS += -I../../../../include/

TEST_GEN_PROGS := dma_map_benchmark

Expand Down
2 changes: 1 addition & 1 deletion tools/testing/selftests/dma/dma_map_benchmark.c
Expand Up @@ -10,8 +10,8 @@
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <linux/map_benchmark.h>
#include <linux/types.h>
#include <linux/map_benchmark.h>

#define NSEC_PER_MSEC 1000000L

Expand Down

0 comments on commit d4b1216

Please sign in to comment.