From patchwork Tue Jun 16 05:43:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 242464 List-Id: U-Boot discussion From: takahiro.akashi at linaro.org (AKASHI Takahiro) Date: Tue, 16 Jun 2020 14:43:07 +0900 Subject: [PATCH] checkpatch: fix a false check against wchar/utf-16 string Message-ID: <20200616054307.6017-1-takahiro.akashi@linaro.org> UEFI subsystem uses utf-16 string, but checkpatch.pl complains about any occurrences of L"xxx" which is definitely legal. So just suppress this kind of warning. Precautiously, we will check u"xxx" as well. Signed-off-by: AKASHI Takahiro --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index edba36565167..b3697720787c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -5462,7 +5462,7 @@ sub process { } # concatenated string without spaces between elements - if ($line =~ /$String[A-Za-z0-9_]/ || $line =~ /[A-Za-z0-9_]$String/) { + if ($line =~ /$String[A-Za-z0-9_]/ || $line =~ /([A-Za-z0-9_]+[Lu]|[A-Za-z0-9_]*[A-KM-Za-tv-z0-9_])$String/) { if (CHK("CONCATENATED_STRING", "Concatenated strings should use spaces between elements\n" . $herecurr) && $fix) {