Re: [PATCH 2/2] clk: Move init fields from clk to clk_hw
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
- Subject: Re: [PATCH 2/2] clk: Move init fields from clk to clk_hw
- From: Paul Walmsley <paul@xxxxxxxxx>
- Date: Tue, 20 Mar 2012 17:47:42 -0600 (MDT)
- Cc: Shawn Guo <shawn.guo@xxxxxxxxxx>, Saravana Kannan <skannan@xxxxxxxxxxxxxx>, Mike Turquette <mturquette@xxxxxxxxxx>, Arnd Bergman <arnd.bergmann@xxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-arm-msm@xxxxxxxxxxxxxxx, Andrew Lunn <andrew@xxxxxxx>, Rob Herring <rob.herring@xxxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxxx>, Jeremy Kerr <jeremy.kerr@xxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Shawn Guo <shawn.guo@xxxxxxxxxxxxx>, Jamie Iles <jamie@xxxxxxxxxxxxx>, Richard Zhao <richard.zhao@xxxxxxxxxx>, Magnus Damm <magnus.damm@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxxxxxx>, Stephen Boyd <sboyd@xxxxxxxxxxxxxx>, Amit Kucheria <amit.kucheria@xxxxxxxxxx>, Deepak Saxena <dsaxena@xxxxxxxxxx>, Grant Likely <grant.likely@xxxxxxxxxxxx>
- In-reply-to: <20120320181050.GN3852@pengutronix.de>
- User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
Hello Sascha
On Tue, 20 Mar 2012, Sascha Hauer wrote:
> [ C99 structure initializer elided ]
>
> This will make a 4000 line file out of a 500 line file. Now when for
> some reason struct clk_divider changes we end with big patches. If the
> clk core gets a new fancy CLK_ flag which we want to have then again
> we end up with big patches. Then there's also the possibility that
> someone finds out that .lock and .hw.flags are common to all dividers
> and comes up with a #define DEFINE_CLK_DIVIDER again to share common
> fields.
At least we can understand easily what is being changed. Readability,
particularly by others not familiar with the clock data, is more important
to me.
So like Saravana, I too prefer C99 structure initializers. At least there
should be a choice.
Quick quiz: in this line below:
imx_clk_divider("foo_clk", "bar_clk", CCM_BASE + 0x20, 0x5, 0x3);
which field is the bitfield shift and which is the bitfield width? :-)
- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux ARM Kernel]
[Linux ARM]
[Linux Omap]
[Fedora ARM]
[Linux for Sparc]
[IETF Annouce]
[Security]
[Bugtraq]
[Linux OMAP]
[Linux MIPS]
[ECOS]
[Asterisk Internet PBX]
[Linux API]