Re: [PATCH 04/10] namespace: perlcritic warnings

From: Stephen Hemminger
Date: Mon Feb 22 2010 - 11:42:14 EST


On Sat, 20 Feb 2010 16:26:24 +0800
Hui Zhu <teawater@xxxxxxxxx> wrote:

> On Sat, Feb 20, 2010 at 01:52, Stephen Hemminger <shemminger@xxxxxxxxxx> wrote:
> > Use local file handle not global.
> > Make loop and other variables local in scope.
> >
> > Signed-off-by: Stephen Hemminger <shemminger@xxxxxxxxxx>
> >
> >
> > --- a/scripts/namespace.pl   Â2010-02-19 08:59:00.432184740 -0800
> > +++ b/scripts/namespace.pl   Â2010-02-19 09:05:52.672644797 -0800
> > @@ -175,12 +175,11 @@ sub do_nm
> > Â Â Â Â}
> > Â Â Â Âif (! -e "$source.c" && ! -e "$source.S") {
> > Â Â Â Â Â Â Â Â# No obvious source, exclude the object if it is conglomerate
> > - Â Â Â Â Â Â Â if (! open(OBJDUMPDATA, "$objdump $basename|")) {
> > - Â Â Â Â Â Â Â Â Â Â Â printf STDERR "$objdump $fullname failed $!\n";
> > - Â Â Â Â Â Â Â Â Â Â Â return;
> > - Â Â Â Â Â Â Â }
> > + Â Â Â Â Â Â Â open(my $objdumpdata, "$objdump $basename|")
> > + Â Â Â Â Â Â Â Â Â or die "$objdump $fullname failed $!\n";
>
> Looks it just want return, are you sure have to change it to die?

Read my previous comment
> If objdump program is missing program should die with message
> to standard error and exit with non zero status, not continue on!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/