On Wed, Apr 29, 2026 at 06:43:24PM +0200, Nicolas Schier wrote:
On Fri, Apr 24, 2026 at 12:51:21PM -0400, Sasha Levin wrote:
quoted
diff --git a/kernel/api/Makefile b/kernel/api/Makefile
new file mode 100644
index 0000000000000..c0a13fc590e4a
--- /dev/null
+++ b/kernel/api/Makefile
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for the Kernel API Specification Framework
+#
+
+# Core API specification framework
+obj-$(CONFIG_KAPI_SPEC) += kernel_api_spec.o
Bike-shedding: I'd use 'obj-y' here, to state clearly that
kernel_api_spec.c is the core part in the kernel/api/ subdir. If
CONFIG_KAPI_SPEC is unset, the subfir will not be entered at all.
Agreed, switched to "obj-y" in v4. The subdir gate moves up to
kernel/Makefile and the entry inside kernel/api/Makefile becomes
unconditional. The other two entries (KAPI_SPEC_DEBUGFS,
KAPI_KUNIT_TEST) keep their own conditional guards since they are
optional sub-features.
--
Thanks,
Sasha