[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DB3PR0402MB39168BDB947322F9C159E42CF56C0@DB3PR0402MB3916.eurprd04.prod.outlook.com>
Date: Wed, 1 Jul 2020 10:20:30 +0000
From: Anson Huang <anson.huang@....com>
To: Arnd Bergmann <arnd@...db.de>
CC: Russell King - ARM Linux <linux@...linux.org.uk>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Sascha Hauer <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
"oleksandr.suvorov@...adex.com" <oleksandr.suvorov@...adex.com>,
Stefan Agner <stefan.agner@...adex.com>,
Peng Fan <peng.fan@....com>, Abel Vesa <abel.vesa@....com>,
Aisheng Dong <aisheng.dong@....com>,
Andy Duan <fugang.duan@....com>,
Daniel Baluta <daniel.baluta@....com>,
YueHaibing <yuehaibing@...wei.com>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Al Viro <viro@...iv.linux.org.uk>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-clk <linux-clk@...r.kernel.org>,
dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH V3 02/10] init.h: Fix the __setup_param() macro for module
build
Hi, Arnd
> Subject: Re: [PATCH V3 02/10] init.h: Fix the __setup_param() macro for
> module build
>
> On Wed, Jul 1, 2020 at 12:02 PM Anson Huang <anson.huang@....com>
> wrote:
> > > Subject: Re: [PATCH V3 02/10] init.h: Fix the __setup_param() macro
> > > for module build On Wed, Jul 1, 2020 at 11:27 AM Anson Huang
> > > <anson.huang@....com>
> > > wrote:
> > > > > Subject: Re: [PATCH V3 02/10] init.h: Fix the __setup_param()
> > > > > macro for module build
> > > Why not move this all to a separate file then and only build it when
> > > CONFIG_CLK_IMX=y?
> > > It seems that you don't need the imx_keep_uart_clocks_param() if the
> > > clk driver is loaded as a module, but then you also don't need the
> > > imx_clk_disable_uart() and imx_register_uart_clocks() functions or
> > > the associated variables.
> >
> > If so, how about just adding "#ifndef MODULE" check for this part of
> > code? I think it should be easier/better than adding a file and build it
> conditionally?
>
> The #ifdef is clearly a simpler change, but I think a separate file is a cleaner
> way to do it. Up to you (unless one of the imx or clk maintainers has a
> preference -- I'm only helping out here, not making decisions).
>
OK, the first version of this patch introduced two __setup_param() implementation
for built-in and loadable module, that leads to all the discussion of fixing __setup_param()
in init.h etc., but you just remind me that __setup_param() is NOT necessary at all when
building loadable module, so I think just add '#ifndef MODULE' should be acceptable, I will
go with this change in V4 patch series, and see if anyone has comment.
Please help review V4 patch series which will be sent out soon.
Thanks,
Anson
Powered by blists - more mailing lists