From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Marek=20Beh=C3=BAn?= Date: Thu, 20 May 2021 13:23:51 +0200 Subject: [PATCH u-boot v4 02/36] checkpatch: require quotes around section name in the __section() macro In-Reply-To: <20210520112425.25166-1-marek.behun@nic.cz> References: <20210520112425.25166-1-marek.behun@nic.cz> Message-ID: <20210520112425.25166-3-marek.behun@nic.cz> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This is how Linux does this now, see Linux commit 339f29d91acf. Signed-off-by: Marek Beh?n --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)/; } -- 2.26.3