From: Mathieu Desnoyers Date: Fri, 27 Jan 2023 13:57:31 +0000 (-0500) Subject: selftests: gpio: Fix incorrect kernel headers search path X-Git-Tag: v6.1.16~132 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=38fe9e0cbd0ff15f43690fbc57110edad8d4a91f;p=users%2Fdwmw2%2Flinux.git selftests: gpio: Fix incorrect kernel headers search path commit 8bb9c1808628babcc7b99ec2439bf102379bd4ac upstream. Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents building against kernel headers from the build environment in scenarios where kernel headers are installed into a specific output directory (O=...). Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Cc: Ingo Molnar Cc: # 5.18+ Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman --- diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile index 616ed40196554..e0884390447dc 100644 --- a/tools/testing/selftests/gpio/Makefile +++ b/tools/testing/selftests/gpio/Makefile @@ -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/ $(KHDR_INCLUDES) +CFLAGS += -O2 -g -Wall $(KHDR_INCLUDES) include ../lib.mk