lkml.org 
[lkml]   [2022]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] checkpatch: don't sanitise quotes in Kconfig files
Date
If Kconfig help text contains a single quote (e.g., can't),
checkpatch replaces all characters with X until another quote
appears in some later help text. This interferes with processing
keywords.

Don't sanitise lines if the file is a Kconfig file.

Signed-off-by: Robert Elliott <elliott@hpe.com>
---
scripts/checkpatch.pl | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index b0cda2f6414d..4d09a324a586 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2714,9 +2714,15 @@ sub process {
sanitise_line_reset($in_comment);

} elsif ($realcnt && $rawline =~ /^(?:\+| |$)/) {
- # Standardise the strings and chars within the input to
- # simplify matching -- only bother with positive lines.
- $line = sanitise_line($rawline);
+ if (($realfile =~ /Kconfig/) ||
+ (!$is_patch && $filename =~ /Kconfig/)) {
+ # Kconfig help text is free to use unmatched quotes
+ $line = $rawline;
+ } else {
+ # Standardise the strings and chars within the input to
+ # simplify matching -- only bother with positive lines.
+ $line = sanitise_line($rawline);
+ }
}
push(@lines, $line);

--
2.37.1
\
 
 \ /
  Last update: 2022-08-15 06:17    [W:0.087 / U:0.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site