From: Arnd Bergmann <arnd@arndb.de>
To: Joe Perches <joe@perches.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Tony Prisk <linux@prisktech.co.nz>,
Olof Johansson <olof@lixom.net>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
vt8500-wm8505-linux-kernel@googlegroups.com,
John Stultz <johnstul@us.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 1/2] timer: vt8500: Move system timer to clocksource
Date: Thu, 3 Jan 2013 08:07:53 +0000 [thread overview]
Message-ID: <201301030807.53550.arnd@arndb.de> (raw)
In-Reply-To: <1357199114.25181.48.camel@joe-AO722>
On Thursday 03 January 2013, Joe Perches wrote:
> Also I think it'd be nicer to write something like:
>
> struct device_node *np;
> int timer_irq;
> const char *reason;
>
> np = of_find_matching_node(NULL, vt8500_timer_ids);
> if (!np) {
> reason = "timer";
> goto error;
> }
> regbase = of_iomap(np, 0);
> if (!regbase) {
> reason = "iobase";
> goto error_put;
> }
> timer_irq = irq_of_parse_and_map(np, 0);
> if (!timer_irq) {
> reason = "irq";
> goto error_remap;
> }
>
> ...
>
> error_remap:
> unmap...;
> error_put:
> of_node_put(np);
> error:
> pr_err("%s: Missing %s description in Device Tree\n",
> __func__, reason);
> return;
Right, but that would be a separate cleanup patch, since the patch that
Tony posted is just supposed to move the code around and change as little
else as possible in the process. The cleanup can come either right before
or right after the move.
Arnd
next prev parent reply other threads:[~2013-01-03 8:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-03 3:25 [PATCH 0/2] Move some mach-vt8500 functions to new directories Tony Prisk
2013-01-03 3:25 ` [PATCH 1/2] timer: vt8500: Move system timer to clocksource Tony Prisk
2013-01-03 7:35 ` Dmitry Torokhov
2013-01-03 7:45 ` Joe Perches
2013-01-03 8:07 ` Arnd Bergmann [this message]
2013-01-03 17:29 ` Stephen Warren
2013-01-03 3:25 ` [PATCH 2/2] irqchip: vt8500: Move irq code to drivers/irqchip Tony Prisk
2013-01-03 4:38 ` Rob Herring
2013-01-03 4:53 ` Tony Prisk
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=201301030807.53550.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=dmitry.torokhov@gmail.com \
--cc=joe@perches.com \
--cc=johnstul@us.ibm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@prisktech.co.nz \
--cc=olof@lixom.net \
--cc=tglx@linutronix.de \
--cc=vt8500-wm8505-linux-kernel@googlegroups.com \
/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