lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20130114073300.ac8d5d4ffffe2d881798a2a2@nvidia.com> Date: Mon, 14 Jan 2013 07:33:00 +0200 From: Hiroshi Doyu <hdoyu@...dia.com> To: Stephen Warren <swarren@...dotorg.org> CC: Prashant Gaikwad <pgaikwad@...dia.com>, "mturquette@...aro.org" <mturquette@...aro.org>, "linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>, "linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org> Subject: Re: [PATCH v4 7/9] clk: tegra: add clock support for tegra30 On Fri, 11 Jan 2013 22:40:50 +0100 Stephen Warren <swarren@...dotorg.org> wrote: > On 01/11/2013 05:17 AM, Hiroshi Doyu wrote: > > On Fri, 11 Jan 2013 08:46:25 +0100 > > Prashant Gaikwad <pgaikwad@...dia.com> wrote: > > > >> Add tegra30 clock support based on common clock framework. > >> > >> Signed-off-by: Prashant Gaikwad <pgaikwad@...dia.com> > > ....... > >> +static void __init tegra30_pll_init(void) > >> +{ > >> + struct clk *clk; > >> + > >> + /* PLLC */ > >> + clk = tegra_clk_pll("pll_c", "pll_ref", clk_base, pmc_base, 0, > >> + 0, &pll_c_params, > >> + TEGRA_PLL_HAS_CPCON | TEGRA_PLL_USE_LOCK, > >> + pll_c_freq_table, NULL); > >> + clk_register_clkdev(clk, "pll_c", NULL); > >> + clks[pll_c] = clk; > > > > Just I noticed that there are quite many same itegration of: > > > > clk_register_clkdev(clk, <ID name>, ?); > > clks[<ID>] = clk; > > > > ID == <ID name> > > > > Can any macro/func do the above at once? > > To my mind, a macro would obfuscate this fairly simple code, unless > there is a table somewhere the maps <ID> to <ID name> which would allow > saving some code space (I just looked; I don't think there is). Agree that those 2 lines may be too simple. I thought that ##string## could do the above. One of the benefit to make them at once is that we'll get a single entry point to register clkdev in tegra. For example, if you insert some debug print in it, it would shows all clkdev registration. > Eventually (later cleanup), I wouldn't be surprised if both parameters > to clk_register_clkdev() became NULL in most cases, since most lookups > are through DT by the end of this series. Ok. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists