Skip to content

Commit

Permalink
selftests: gpio: fix include path to kernel headers for out of tree b…
Browse files Browse the repository at this point in the history
…uilds

[ Upstream commit f63731e ]

When building selftests out of the kernel tree the gpio.h the include
path is incorrect and the build falls back to the system includes
which may be outdated.

Add the KHDR_INCLUDES to the CFLAGS to include the gpio.h from the
build tree.

Fixes: 4f4d0af ("selftests: gpio: restore CFLAGS options")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
warthog618 authored and gregkh committed Jul 29, 2022
1 parent b47ade5 commit ea85772
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/gpio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
TEST_PROGS := gpio-mockup.sh gpio-sim.sh
TEST_FILES := gpio-mockup-sysfs.sh
TEST_GEN_PROGS_EXTENDED := gpio-mockup-cdev gpio-chip-info gpio-line-name
CFLAGS += -O2 -g -Wall -I../../../../usr/include/
CFLAGS += -O2 -g -Wall -I../../../../usr/include/ $(KHDR_INCLUDES)

include ../lib.mk

0 comments on commit ea85772

Please sign in to comment.