Messages in this thread Patch in this message | | | From | Thierry Reding <> | Subject | [PATCH] checkpatch.pl: Allow '+' in compatible strings | Date | Tue, 14 Jul 2020 11:41:41 +0200 |
| |
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
| |