[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250513160056.7576-1-wen.yang@linux.dev>
Date: Wed, 14 May 2025 00:00:56 +0800
From: Wen Yang <wen.yang@...ux.dev>
To: Masahiro Yamada <masahiroy@...nel.org>,
ndrew Morton <akpm@...ux-foundation.org>
Cc: Nicolas Schier <nicolas@...sle.eu>,
Miguel Ojeda <ojeda@...nel.org>,
linux-kernel@...r.kernel.org,
Wen Yang <wen.yang@...ux.dev>
Subject: [PATCH] scripts: headers_install: fix a false positive
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.
Signed-off-by: Wen Yang <wen.yang@...ux.dev>
---
scripts/headers_install.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh
index 6bbccb43f7e7..41722bcc8668 100755
--- a/scripts/headers_install.sh
+++ b/scripts/headers_install.sh
@@ -44,6 +44,7 @@ scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ $TMPFILE > $OUTFILE
# Remove /* ... */ style comments, and find CONFIG_ references in code
configs=$(sed -e '
:comment
+ s://.*::
s:/\*[^*][^*]*:/*:
s:/\*\*\**\([^/]\):/*\1:
t comment
--
2.25.1
Powered by blists - more mailing lists