lkml.org 
[lkml]   [2015]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch v2] checkpatch: complain about GW-BASIC style label names
On Wed, 13 May 2015 15:16:13 +0200
David Sterba <dsterba@suse.cz> wrote:

> On Wed, May 13, 2015 at 03:37:12PM +0300, Dan Carpenter wrote:
> > GW-BASIC style label names are annoying so we can warn about that in
> > checkpatch. The warnings look like:
> >
> > WARNING: 'fail2' isn't informative - prefer descriptive label names
> > #267: FILE: ./sound/ppc/beep.c:267:
> > + fail2: snd_ctl_remove(chip->card, beep_ctl);
> >
> > This generates slightly under 2000 new warnings. None of them are
> > false positives.
>
> Please whitelist fs/btrfs/* from this type of checkpatch warning.

If you could whitelist the rest of the kernel too that would also be
useful.

There's nothing wrong with driver code that ends


fail_3:
xxx
fail_2:
yyy
fail_1:

blah
return;

if anything it makes it very clear which level of unravelling on error is
occurring and at a glance enables you to see that the error handling is
ordered properly.



\
 
 \ /
  Last update: 2015-05-13 16:01    [W:0.647 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site