From: Richard Weinberger <richard@nod.at>
To: "\"L. Alberto Giménez\"" <agimenez@sysvalve.es>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>
Subject: Re: [PATCH] checkpatch.pl: Add warning for harmful goto labels
Date: Sat, 21 Mar 2015 23:12:57 +0100 [thread overview]
Message-ID: <550DECE9.3090801@nod.at> (raw)
In-Reply-To: <20150321220655.GA14583@bart.evergreen.loc>
Am 21.03.2015 um 23:06 schrieb L. Alberto Giménez:
> On Sat, Mar 21, 2015 at 10:40:46PM +0100, Richard Weinberger wrote:
>> Huh? Since when?
>
> There are a lot of cases where a too generic goto label for cleanup
> causes a bug or makes debugging harder.
>
> Last time was this G+ post, by Dan Carpenter:
>
> https://plus.google.com/106378716002406849458/posts/DfuAkt8szf2
>
>
>> rw@azrael:~/linux (for-v4.1/uml_misc $)> git grep -e "goto out;" | wc -l
>> 26667
>> rw@azrael:~/linux (for-v4.1/uml_misc $)> git grep -e "goto fail;" | wc -l
>> 3733
>
> 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.
>> What is next? Variable name "i" considered harmful?
>
> No one complained about that so far. I might add that to checkpatch.pl
> if needed.
I *really* *really* hope you're kidding.
>> Can we please stop this nonsense.
>
> It's just a proposal for a warning. If it is really not needed, it won't
> be applied and life will go on :)
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.
Thanks,
//richard
next prev parent reply other threads:[~2015-03-21 22:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-21 21:16 [PATCH] checkpatch.pl: Add warning for harmful goto labels L. Alberto Giménez
2015-03-21 21:40 ` Richard Weinberger
2015-03-21 22:06 ` L. Alberto Giménez
2015-03-21 22:12 ` Richard Weinberger [this message]
2015-03-22 2:56 ` Joe Perches
2015-03-22 12:16 ` L. Alberto Giménez
2015-03-21 21:41 ` Peter Hurley
2015-03-21 22:09 ` L. Alberto Giménez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=550DECE9.3090801@nod.at \
--to=richard@nod.at \
--cc=agimenez@sysvalve.es \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.