From: Dan Carpenter <dan.carpenter@oracle.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] ARM: imx: fix error handling
Date: Fri, 16 May 2014 22:21:08 +0000 [thread overview]
Message-ID: <20140516222108.GI8897@mwanda> (raw)
In-Reply-To: <20140516192451.GP16662@pengutronix.de>
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.
>
> 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.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: dan.carpenter@oracle.com (Dan Carpenter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: imx: fix error handling
Date: Sat, 17 May 2014 01:21:08 +0300 [thread overview]
Message-ID: <20140516222108.GI8897@mwanda> (raw)
In-Reply-To: <20140516192451.GP16662@pengutronix.de>
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.
>
> 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.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Emil Goode <emilgoode@gmail.com>,
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 01:21:08 +0300 [thread overview]
Message-ID: <20140516222108.GI8897@mwanda> (raw)
In-Reply-To: <20140516192451.GP16662@pengutronix.de>
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.
>
> 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.
regards,
dan carpenter
next prev parent reply other threads:[~2014-05-16 22:21 UTC|newest]
Thread overview: 42+ 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 9:54 ` Emil Goode
2014-05-16 9:54 ` Emil Goode
2014-05-16 10:40 ` walter harms
2014-05-16 10:40 ` walter harms
2014-05-16 10:40 ` walter harms
2014-05-16 11:16 ` Emil Goode
2014-05-16 11:16 ` Emil Goode
2014-05-16 11:16 ` Emil Goode
2014-05-16 11:49 ` walter harms
2014-05-16 11:49 ` walter harms
2014-05-16 11:49 ` walter harms
2014-05-16 19:31 ` Uwe Kleine-König
2014-05-16 19:31 ` Uwe Kleine-König
2014-05-16 19:31 ` Uwe Kleine-König
2014-05-17 15:35 ` Emil Goode
2014-05-17 15:35 ` Emil Goode
2014-05-17 15:35 ` Emil Goode
2014-05-17 19:05 ` Uwe Kleine-König
2014-05-17 19:05 ` Uwe Kleine-König
2014-05-17 19:05 ` Uwe Kleine-König
2014-05-17 22:14 ` Emil Goode
2014-05-17 22:14 ` Emil Goode
2014-05-17 22:14 ` Emil Goode
2014-05-18 14:37 ` Emil Goode
2014-05-18 14:37 ` Emil Goode
2014-05-18 14:37 ` Emil Goode
2014-05-18 15:38 ` Emil Goode
2014-05-18 15:38 ` Emil Goode
2014-05-18 15:38 ` Emil Goode
2014-05-16 19:24 ` Uwe Kleine-König
2014-05-16 19:24 ` Uwe Kleine-König
2014-05-16 19:24 ` Uwe Kleine-König
2014-05-16 22:21 ` Dan Carpenter [this message]
2014-05-16 22:21 ` Dan Carpenter
2014-05-16 22:21 ` Dan Carpenter
2014-05-16 22:47 ` Emil Goode
2014-05-16 22:47 ` Emil Goode
2014-05-16 22:47 ` Emil Goode
2014-05-16 23:18 ` Emil Goode
2014-05-16 23:18 ` Emil Goode
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=20140516222108.GI8897@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-arm-kernel@lists.infradead.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.