public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Emil Goode <emilgoode@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Shawn Guo" <shawn.guo@freescale.com>,
	"Sascha Hauer" <kernel@pengutronix.de>,
	"Russell King" <linux@arm.linux.org.uk>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v2] ARM: imx: fix error handling
Date: Sat, 17 May 2014 00:47:33 +0200	[thread overview]
Message-ID: <20140516224733.GA4323@lianli> (raw)
In-Reply-To: <20140516222108.GI8897@mwanda>


On Sat, May 17, 2014 at 01:21:08AM +0300, Dan Carpenter wrote:
> On Fri, May 16, 2014 at 09:24:51PM +0200, Uwe Kleine-König wrote:
> > I didn't check if it is easily possible, but converting this file to use
> > platform_device_register_full might simplify it considerably.
> 
> In a separate patch, though, please.

Will consider another patch.

> 
> > 
> > I'm not sure this fix is critical, because the problem happens if an
> > allocation during boot fails. But still, if you want to get this fix
> > into a stable release, you should simplify it, i.e. don't do the code
> > reorganisations. (Also the "more clear" part seems to be subjective, I
> > like the error handling better as it is now. But that might only be me.)
> 
> Emil's error handling is done exactly in the correct way...  The error
> path and success path are separate.  Unwinding in the reverse order.
> The label names describe the label locations.  Most days I spend hours
> looking at linux kernel error handling and I can assure you that
> sensible labels like this are a rare and wonderful gift.
> 
> It's hard for me to imagine how anyone could defend the original error
> handling.  The label was "err".  The error handling was randomly plopped
> in the middle of the success handling.  Whenever I see new "creative"
> error handling like this it drives me nuts because obviously it's going
> to be buggy like a swamp picnic.

Thank you for the colorful reply, I guess there is no need for me to
further defend my choice of labels :)

Best regards,

Emil Goode

  reply	other threads:[~2014-05-16 22:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-16  9:54 [PATCH v2] ARM: imx: fix error handling Emil Goode
2014-05-16 10:40 ` walter harms
2014-05-16 11:16   ` Emil Goode
2014-05-16 11:49     ` walter harms
2014-05-16 19:31       ` Uwe Kleine-König
2014-05-17 15:35         ` Emil Goode
2014-05-17 19:05           ` Uwe Kleine-König
2014-05-17 22:14             ` Emil Goode
2014-05-18 14:37             ` Emil Goode
2014-05-18 15:38             ` Emil Goode
2014-05-16 19:24 ` Uwe Kleine-König
2014-05-16 22:21   ` Dan Carpenter
2014-05-16 22:47     ` Emil Goode [this message]
2014-05-16 23:18   ` Emil Goode

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=20140516224733.GA4323@lianli \
    --to=emilgoode@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=shawn.guo@freescale.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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