From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Consolidate clks_register() and similar
Date: Sun, 10 Jan 2010 23:12:32 +0000 [thread overview]
Message-ID: <20100110231232.GD15812@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <201001110923.31809.jeremy.kerr@canonical.com>
On Mon, Jan 11, 2010 at 09:23:31AM +1100, Jeremy Kerr wrote:
> Russell,
>
> > --- a/arch/arm/mach-bcmring/core.c
> > +++ b/arch/arm/mach-bcmring/core.c
> > @@ -142,8 +142,7 @@ void __init bcmring_amba_init(void)
> >
> > chipcHw_busInterfaceClockEnable(bus_clock);
> >
> > - for (i = 0; i < ARRAY_SIZE(lookups); i++)
> > - clkdev_add(&lookups[i]);
> > + clkdev_add_table(lookups, ARRAY_SIEZ(lookups));
>
> SIEZ -> SIZE.
Fied.
> Also, perhaps a macro to simplify this common usage?
>
> #define clkdev_add_table(clks) __clkdev_add_table(clks, ARRAY_SIZE(clks))
I'm not a fan of that kind of clean up - it leads people into
thinking that they can pass a normal pointer instead of an array to
clkdev_add_table() - and then they'll get a surprise.
PXA has ARRAY_AND_SIZE() which I think is rather nice for this kind of
thing, but other people had other thoughts on that...
next prev parent reply other threads:[~2010-01-10 23:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-10 17:28 [PATCH] Consolidate clks_register() and similar Russell King - ARM Linux
2010-01-10 22:23 ` Jeremy Kerr
2010-01-10 23:12 ` Russell King - ARM Linux [this message]
2010-01-11 1:04 ` Ben Dooks
2010-01-11 17:26 ` H Hartley Sweeten
2010-01-11 17:28 ` Russell King - ARM Linux
2010-01-11 22:06 ` Kevin Hilman
2010-01-12 12:17 ` Russell King - ARM Linux
2010-01-12 17:29 ` H Hartley Sweeten
2010-01-12 17:35 ` Russell King - ARM Linux
2010-01-12 17:43 ` H Hartley Sweeten
2010-01-12 18:57 ` Russell King - ARM Linux
2010-01-12 19:16 ` Kevin Hilman
2010-01-12 0:11 ` Eric Miao
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=20100110231232.GD15812@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).