On Fri, Apr 09, 2021 at 07:40:11AM +0200, Greg Kurz <gr...@kaod.org> wrote:
> On Thu, 8 Apr 2021 10:49:13 -0700 > Isaku Yamahata <isaku.yamah...@gmail.com> wrote: > > > > > How about initializing them explicitly as follows? > > ($realfile ne '') prevents the case realfile eq '' && acpi_testexpted eq ''. > > Anyway your patch also should fix it. So > > Reviewed-by: Isaku Yamahata <isaku.yamah...@intel.com> > > > > > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > > index 8f7053ec9b..2eb894a628 100755 > > --- a/scripts/checkpatch.pl > > +++ b/scripts/checkpatch.pl > > @@ -1325,8 +1325,8 @@ sub process { > > my %suppress_whiletrailers; > > my %suppress_export; > > > > - my $acpi_testexpected; > > - my $acpi_nontestexpected; > > + my $acpi_testexpected = ''; > > + my $acpi_nontestexpected = ''; > > > > Hmm... I haven't tried but I believe this will break when these are > passed to checkfilename() : > > sub checkfilename { > my ($name, $acpi_testexpected, $acpi_nontestexpected) = @_; > [...] > if (defined $$acpi_testexpected and defined $$acpi_nontestexpected) { > ERROR("Do not add expected files together with tests, " . > > > > # Pre-scan the patch sanitizing the lines. Oops. You're right. I scratch it. -- Isaku Yamahata <isaku.yamah...@gmail.com>