summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMarek BehĂșn <marek.behun@nic.cz>2021-05-20 13:23:51 +0200
committerTom Rini <trini@konsulko.com>2021-05-24 14:21:30 -0400
commit9ce799aaba104a1f0d36bf84caec4c807fa31baa (patch)
treed60ea19710aa3131ef6a6878eba71bb87a1406cf /scripts
parent364bef150d9f2a03aebb427363031d56b244bf84 (diff)
downloadu-boot-9ce799aaba104a1f0d36bf84caec4c807fa31baa.tar.gz
u-boot-9ce799aaba104a1f0d36bf84caec4c807fa31baa.tar.xz
u-boot-9ce799aaba104a1f0d36bf84caec4c807fa31baa.zip
checkpatch: require quotes around section name in the __section() macro
This is how Linux does this now, see Linux commit 339f29d91acf. Signed-off-by: Marek BehĂșn <marek.behun@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 59a714a95f..08a827535a 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -6073,7 +6073,7 @@ sub process {
my $old = substr($rawline, $-[1], $+[1] - $-[1]);
my $new = substr($old, 1, -1);
if (WARN("PREFER_SECTION",
- "__section($new) is preferred over __attribute__((section($old)))\n" . $herecurr) &&
+ "__section(\"$new\") is preferred over __attribute__((section($old)))\n" . $herecurr) &&
$fix) {
$fixed[$fixlinenr] =~ s/\b__attribute__\s*\(\s*\(\s*_*section_*\s*\(\s*\Q$old\E\s*\)\s*\)\s*\)/__section($new)/;
}