On 3/16/20 7:18 PM, Peng Fan wrote: >> Subject: RE: [PATCH V3 1/7] firmware: imx: Add stubs for !CONFIG_IMX_SCU >> case >> >> Hi, Alexandre >> >>> -----Original Message----- >>> From: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx> >>> Sent: Monday, March 16, 2020 5:16 PM >>> To: Anson Huang <anson.huang@xxxxxxx> >>> Cc: Shawn Guo <shawnguo@xxxxxxxxxx>; Peng Fan <peng.fan@xxxxxxx>; >>> s.hauer@xxxxxxxxxxxxxx; kernel@xxxxxxxxxxxxxx; festevam@xxxxxxxxx; >>> dmitry.torokhov@xxxxxxxxx; a.zummo@xxxxxxxxxxxx; >> rui.zhang@xxxxxxxxx; >>> daniel.lezcano@xxxxxxxxxx; amit.kucheria@xxxxxxxxxxxxx; wim@linux- >>> watchdog.org; linux@xxxxxxxxxxxx; Daniel Baluta >>> <daniel.baluta@xxxxxxx>; gregkh@xxxxxxxxxxxxxxxxxxx; >>> linux@xxxxxxxxxxxxxxxx; tglx@xxxxxxxxxxxxx; m.felsch@xxxxxxxxxxxxxx; >>> andriy.shevchenko@xxxxxxxxxxxxxxx; >>> arnd@xxxxxxxx; ronald@xxxxxxxxxxxxx; krzk@xxxxxxxxxx; robh@xxxxxxxxxx; >>> Leonard Crestez <leonard.crestez@xxxxxxx>; Aisheng Dong >>> <aisheng.dong@xxxxxxx>; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux- >>> kernel@xxxxxxxxxxxxxxx; linux-input@xxxxxxxxxxxxxxx; linux- >>> rtc@xxxxxxxxxxxxxxx; linux-pm@xxxxxxxxxxxxxxx; linux- >>> watchdog@xxxxxxxxxxxxxxx; dl-linux-imx <linux-imx@xxxxxxx> >>> Subject: Re: [PATCH V3 1/7] firmware: imx: Add stubs for >>> !CONFIG_IMX_SCU case >>> >>> On 16/03/2020 09:08:53+0000, Anson Huang wrote: >>>>> Why do you absolutely need to compile them independently? From a >>>>> code coverage point of view, having: >>>>> >>>>> COMPILE_TEST=y >>>>> CONFIG_IMX_SCU=y >>>>> >>>>> is enough to select and compile the remaining drivers. >>>> >>>> What I meant is for below case, like using other arch config which >>>> does NOT have CONFIG_IMX_SCU selected, ONLY with COMPILE_TEST >>>> selected, adding stubs for IMX_SCU APIs can fix such scenario. >>>> >>>> COMPILE_TEST=y >>>> CONFIG_IMX_SCU=n >>>> >>> >>> Why is that an issue? If they don't have IMX_SCU selected, then the >>> other SCU driver are not selected either, having stubs doesn't change >>> that you will have to select at least one option. Please explain what >>> is the issue that is not solved here. >> >> OK, what I thought is even without IMX_SCU selected, other SCU drivers still >> can be selected for build test after adding "COMPILE_TEST" to the kconfig, >> like below, if without IMX_SCU API stubs, the "COMPILE_TEST" can NOT be >> added to SCU drivers to enable build test, so I think the IMX_SCU API stubs >> should be added? > > Forgot to mention, without stub api, for drivers with > " #include <linux/firmware/imx/sci.h> " will met compile error without > +#ifdef CONFIG_IMX_SCU > +#endif > > So we have to use ifdef CONFIG_IMX_SCU to guard the include. > Add "depends on IMX_SCU" to the Kconfig entry for those drivers, and/or drop "COMPILE_TEST" from their Kconfig entry. Really, COMPILE_TEST is abused here. I start to understand those who advocate that it should be removed. This is an excellent case in point. Guenter