mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Richard Weinberger <richard@nod.at>
Cc: "\"L. Alberto Giménez\"" <agimenez@sysvalve.es>,
	LKML <linux-kernel@vger.kernel.org>,
	"Andy Whitcroft" <apw@canonical.com>
Subject: Re: [PATCH] checkpatch.pl: Add warning for harmful goto labels
Date: Sat, 21 Mar 2015 19:56:39 -0700	[thread overview]
Message-ID: <1426992999.20324.9.camel@perches.com> (raw)
In-Reply-To: <550DECE9.3090801@nod.at>

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


  reply	other threads:[~2015-03-22  2:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-21 21:16 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
2015-03-22  2:56       ` Joe Perches [this message]
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=1426992999.20324.9.camel@perches.com \
    --to=joe@perches.com \
    --cc=agimenez@sysvalve.es \
    --cc=apw@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard@nod.at \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome