Re: [PATCH] drivers/watchdog/Kconfig: Let XILINX_WATCHDOG and TEGRA_WATCHDOG depend on HAS_IOMEM

From: Chen Gang
Date: Sat Oct 04 2014 - 21:19:32 EST


On 10/5/14 8:18, Guenter Roeck wrote:
> On 10/04/2014 02:39 AM, Chen Gang wrote:
>> They need HAS_IOMEM, so let them depend on it, the related error (with
>> allmodconfig under um):
>>
>> MODPOST 1205 modules
>> ERROR: "syscall" [fs/hostfs/hostfs.ko] undefined!
>> ERROR: "devm_ioremap_resource" [drivers/watchdog/tegra_wdt.ko] undefined!
>> ERROR: "devm_ioremap_resource" [drivers/watchdog/of_xilinx_wdt.ko] undefined!
>>
> Headline is a bit excessive ("watchdog: ..." would have been sufficient,
> the first error is irrelevant as you found out yourself, and you got an
> extra empty line here. Otherwise looks good.
>
> Can you resubmit with that fixed ?
>

OK, thank, I shall send patch v2 for it.

> On a side note, guess the conclusion was to not provide a dummy for
> devm_ioremap_resource if HAS_IOMEM is not defined. Too bad.
>

For me, it is checked during config time, so need report error during
compiling or building time instead of dummy.

And I'd like to let devm_ioremap* quoted by "#if HAS_IOMEM", so can
find this issue during compiling time, not in linking time (which can
save builder's time resource).


Thanks.

>>
>> Signed-off-by: Chen Gang <gang.chen.5i5j@xxxxxxxxx>
>> ---
>> drivers/watchdog/Kconfig | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
>> index a51ccf3..d0ddf90 100644
>> --- a/drivers/watchdog/Kconfig
>> +++ b/drivers/watchdog/Kconfig
>> @@ -132,6 +132,7 @@ config WM8350_WATCHDOG
>>
>> config XILINX_WATCHDOG
>> tristate "Xilinx Watchdog timer"
>> + depends on HAS_IOMEM
>> select WATCHDOG_CORE
>> help
>> Watchdog driver for the xps_timebase_wdt ip core.
>> @@ -472,7 +473,7 @@ config SIRFSOC_WATCHDOG
>>
>> config TEGRA_WATCHDOG
>> tristate "Tegra watchdog"
>> - depends on ARCH_TEGRA || COMPILE_TEST
>> + depends on (ARCH_TEGRA || COMPILE_TEST) && HAS_IOMEM
>> select WATCHDOG_CORE
>> help
>> Say Y here to include support for the watchdog timer
>>
>

--
Chen Gang

Open, share, and attitude like air, water, and life which God blessed
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/