[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1426992999.20324.9.camel@perches.com>
Date: Sat, 21 Mar 2015 19:56:39 -0700
From: Joe Perches <joe@...ches.com>
To: Richard Weinberger <richard@....at>
Cc: "\"L. Alberto" Giménez" <agimenez@...valve.es>,
LKML <linux-kernel@...r.kernel.org>,
Andy Whitcroft <apw@...onical.com>
Subject: Re: [PATCH] checkpatch.pl: Add warning for harmful goto labels
On Sat, 2015-03-21 at 23:12 +0100, Richard Weinberger wrote:
> Am 21.03.2015 um 23:06 schrieb L. Alberto Giménez:
> > There are a lot of cases where a too generic goto label for cleanup
> > causes a bug or makes debugging harder.
[]
> > If something is already in the kernel code, does that mean that it's OK?
> > I honestly don't think so, and I think that goto labels for cleanup exit
> > paths should be a little more descriptive.
>
> I disagree. out and exit are perfectly fine labels.
I agree with you Richard.
While the form of the patch is fine, but content is not.
There might be a case for a coccinelle style patch that
looks for more than a single label in a function and looks
at the label name choices, but I think it'd be pretty
dubious at best.
> > It's just a proposal for a warning. If it is really not needed, it won't
> > be applied and life will go on :)
In that case, it'd be nicer to preface the patch subject with RFC
> checkpatch.pl is already more than annoying. It used to be a nice tool but
> it becomes more and more an harassment for guys who actually work on the kernel.
Richard, what sub-optimal messages do you think checkpatch
produces by default?
cheers, Joe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists