lkml.org 
[lkml]   [2015]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] checkpatch.pl: Add warning for harmful goto labels
From
Date
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



\
 
 \ /
  Last update: 2015-03-22 04:21    [W:0.047 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site