lkml.org 
[lkml]   [2020]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] checkpatch.pl: Allow '+' in compatible strings
Date
From: Thierry Reding <treding@nvidia.com>

The current checks will interpret a '+' character as special because
they use regular expression matching. Escape the '+' character if it
appears in a compatible string.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
scripts/checkpatch.pl | 1 +
1 file changed, 1 insertion(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 4c820607540b..8104d0736e7f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3145,6 +3145,7 @@ sub process {
my $vp_file = $dt_path . "vendor-prefixes.yaml";

foreach my $compat (@compats) {
+ $compat =~ s/\+/\\+/;
my $compat2 = $compat;
$compat2 =~ s/\,[a-zA-Z0-9]*\-/\,<\.\*>\-/;
my $compat3 = $compat;
--
2.27.0
\
 
 \ /
  Last update: 2020-07-14 11:42    [W:0.182 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site