Re: [PATCH v3 1/9] kernel/api: introduce kernel API specification framework

From
Sasha Levin <sashal@kernel.org>
Date
2026-05-05 07:46:16
Also in
linux-doc, linux-fsdevel, linux-kbuild, linux-kselftest, lkml, tools, workflows
Reply to
Nicolas Schier, 2026-04-30
On Wed, Apr 29, 2026 at 06:32:16PM +0200, Nicolas Schier wrote:
On Sun, Apr 26, 2026 at 11:37:45PM -0400, Nathan Chancellor wrote:
quoted
On Fri, 24 Apr 2026 12:51:21 -0400, Sasha Levin [off-list ref] wrote:
quoted
diff --git a/kernel/Makefile b/kernel/Makefile
[...]
+obj-$(CONFIG_KAPI_SPEC) += api/
+# Ensure api/ is always cleaned even when CONFIG_KAPI_SPEC is not set
+obj- += api/
If $(CONFIG_KAPI_SPEC) is not set, shouldn't

  obj-$(CONFIG_KAPI_SPEC) += api/

evaluate to

  obj- += api/

anyways? Why the duplication? This is the only place in the kernel where
this would be needed?
yes, this is definitely not needed, as obj- is always evaluated during
'make clean', cp. scripts/Makefile.clean [1].

Kind regards
Nicolas

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/Makefile.clean?h=v7.1-rc1#n30
Thanks for the pointer!

The redundant "obj- += api/" and the accompanying comment are dropped in v4.

--
Thanks,
Sasha
Thread (18 messages) 18 messages, 3 authors, last reply 2026-05-05
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help