lkml.org 
[lkml]   [2007]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] update checkpatch.pl to version 0.08
On Tue, 24 Jul 2007 10:06:51 +0100 Andy Whitcroft <apw@shadowen.org> wrote:

> > This is a royal pain, since it now throws an ERROR for the obviously
> > preferable piece of code below:
> >
> > if (err) {
> > do_something();
> > return -ERR;
> > } else {
> > do_somthing_else();
> > }
>
> Hmmm, is that obviouly nicer than the below? Its fully a line longer
> for no benefit. But ignoring that, this seems to have snuck in to
> CodingStyle hmmm ... will see what I can do if anything to stop these
> being picked up I guess.
>
> if (err) {
> do_something();
> return -ERR;
> } else
> do_something_else();

The kool kids on linux-usb-devel largely ended up deciding that the second
version looks dorky.

Especially if there's a comment over do_something_else(), and if there's
not a comment, perhaps there should be?

> Andrew, as you merged the change to CodingStyle I'll take that as your
> being ok with these being accepted.

It's very marginal and is sure to get people hot and bothered. I'd suggest
that checkpatch be neutral on that.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-24 11:19    [W:0.201 / U:1.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site