public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] checkpatch.pl: Allow '+' in compatible strings
@ 2020-07-14  9:41 Thierry Reding
  2020-07-14 11:14 ` Joe Perches
  2020-07-14 16:21 ` Rob Herring
  0 siblings, 2 replies; 7+ messages in thread
From: Thierry Reding @ 2020-07-14  9:41 UTC (permalink / raw)
  To: Andy Whitcroft, Joe Perches; +Cc: Rob Herring, linux-kernel

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-07-15  7:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-14  9:41 [PATCH] checkpatch.pl: Allow '+' in compatible strings Thierry Reding
2020-07-14 11:14 ` Joe Perches
2020-07-14 13:12   ` Thierry Reding
2020-07-14 16:21 ` Rob Herring
2020-07-14 17:12   ` Joe Perches
2020-07-14 17:42     ` Rob Herring
2020-07-15  7:22       ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox