blob: 27277537c7b859508b3537aa44d746703a8d49cc [file] [log] [blame]
From: Wen Yang <wen.yang@linux.dev>
Subject: scripts: headers_install: fix a false positive
Date: Sun, 29 Jun 2025 23:52:07 +0800
The current implementation only handles C89 style comments (/*... */) in
the code, and there are false positives for C99 style comments (//...).
This patch fixes this issue.
Link: https://lkml.kernel.org/r/20250629155208.16174-1-wen.yang@linux.dev
Signed-off-by: Wen Yang <wen.yang@linux.dev>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
scripts/headers_install.sh | 1 +
1 file changed, 1 insertion(+)
--- a/scripts/headers_install.sh~scripts-headers_install-fix-a-false-positive
+++ a/scripts/headers_install.sh
@@ -44,6 +44,7 @@ scripts/unifdef -U__KERNEL__ -D__EXPORTE
# Remove /* ... */ style comments, and find CONFIG_ references in code
configs=$(sed -e '
:comment
+ s://.*::
s:/\*[^*][^*]*:/*:
s:/\*\*\**\([^/]\):/*\1:
t comment
_