From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Behun Date: Sun, 7 Mar 2021 05:55:02 +0100 Subject: [PATCH u-boot 05/39] checkpatch: require quotes around section name in the __section() macro In-Reply-To: <7063657e-8a17-2b31-ee4a-0dc90ae0f0ea@denx.de> References: <20210307042538.21229-1-marek.behun@nic.cz> <20210307042538.21229-6-marek.behun@nic.cz> <7063657e-8a17-2b31-ee4a-0dc90ae0f0ea@denx.de> Message-ID: <20210307055502.59db3439@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 On Sun, 7 Mar 2021 05:47:56 +0100 Marek Vasut wrote: > On 3/7/21 5:25 AM, Marek Beh?n wrote: > > 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 755f4802a4..fd1e9c4d24 100755 > > --- a/scripts/checkpatch.pl > > +++ b/scripts/checkpatch.pl > > @@ -6065,7 +6065,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)/; > > Shouldn't some of the patches which are clearly fixes be sent as > separate fixes, so they can be picked while the LTO support is being > worked on ? Yes, ideally it would be better, but: this patch is connected to patch 6 of this series, and patch 6 needs to be in this series because otherwise people trying to apply this series would get an error. The first 4 patches are also fixes for something else, but they were discovered thanks to LTO and without them users will get warnings/errors when trying to build for some boards. Tom, should I send these patches separately? Also the first 3 patches should maybe be applied via Stefan and Simon, via their trees... Marek