[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AM0PR04MB448194CBA97704849500B72B88430@AM0PR04MB4481.eurprd04.prod.outlook.com>
Date: Mon, 2 Dec 2019 05:11:59 +0000
From: Peng Fan <peng.fan@....com>
To: Leonard Crestez <leonard.crestez@....com>,
Abel Vesa <abel.vesa@....com>
CC: Shawn Guo <shawnguo@...nel.org>,
"mturquette@...libre.com" <mturquette@...libre.com>,
"sboyd@...nel.org" <sboyd@...nel.org>,
"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
"festevam@...il.com" <festevam@...il.com>,
"kernel@...gutronix.de" <kernel@...gutronix.de>,
dl-linux-imx <linux-imx@....com>,
Anson Huang <anson.huang@....com>,
Jacky Bai <ping.bai@....com>,
"linux-clk@...r.kernel.org" <linux-clk@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/7] clk: imx: clk-pll14xx: Switch to clk_hw based API
> Subject: Re: [PATCH 1/7] clk: imx: clk-pll14xx: Switch to clk_hw based API
>
> On 2019-12-02 4:26 AM, Peng Fan wrote:
> >> Subject: Re: [PATCH 1/7] clk: imx: clk-pll14xx: Switch to clk_hw
> >> based API On Tue, Oct 29, 2019 at 01:40:54PM +0000, Peng Fan wrote:
> >>> From: Peng Fan <peng.fan@....com>
> >>>
> >>> Switch the imx_clk_pll14xx function to clk_hw based API, rename
> >>> accordingly and add a macro for clk based legacy. This allows us to
> >>> move closer to a clear split between consumer and provider clk APIs.
> >>>
> >>> diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index
> >>> bc5bb6ac8636..5038622f1a72 100644
> >>> --- a/drivers/clk/imx/clk.h
> >>> +++ b/drivers/clk/imx/clk.h
> >>> @@ -97,8 +97,12 @@ extern struct imx_pll14xx_clk imx_1443x_pll;
> >>> #define imx_clk_mux(name, reg, shift, width, parents, num_parents) \
> >>> imx_clk_hw_mux(name, reg, shift, width, parents,
> >>> num_parents)->clk
> >>>
> >>> -struct clk *imx_clk_pll14xx(const char *name, const char *parent_name,
> >>> - void __iomem *base, const struct imx_pll14xx_clk *pll_clk);
> >>> +#define imx_clk_pll14xx(name, parent_name, base, pll_clk) \
> >>> + imx_clk_hw_pll14xx(name, parent_name, base, pll_clk)->clk
> >>> +
> >>
> >> I would suggest to use an inline function for this, which will be
> >> more readable and complying to kernel coding style.
> >
> > ok, I'll send out v2.
>
> Blindly dereferencing ->clk will crash instead of propagating errors so you
> might want to use the to_clk helper from here:
>
> https://patchwork.kernel.org/patch/11257811/
I not see Abel's patch applied, should I include Abel's patchset in my v2?
Or I posted out my v2 with only my changes based on Abel's patchset?
Thanks,
Peng.
>
> --
> Regards,
> Leonard
Powered by blists - more mailing lists