Re: [PATCH] watchdog: simatic: add PCI dependency

From: Arnd Bergmann
Date: Mon Aug 14 2023 - 04:50:27 EST


On Mon, Aug 14, 2023, at 10:27, xingtong.wu wrote:

>>
>> config SIEMENS_SIMATIC_IPC_WDT
>> tristate "Siemens Simatic IPC Watchdog"
>> - depends on SIEMENS_SIMATIC_IPC
>> + depends on SIEMENS_SIMATIC_IPC && PCI
>
> The SIEMENS_SIMATIC_IPC_WDT does not depends on PCI directly,
> it should depends on P2SB, then P2SB depends on PCI
>
>> default y
>> select WATCHDOG_CORE
>> select P2SB
>
> You can replace the "select" to "depends on" instead.

That would also work, but it's generally best not to mix
'depends on' and 'select' for the same symbol. Changing
all three 'select P2SB' to 'depends on P2SB', or removing
the prompt to turn P2SB itself into a hidden symbol is
probably a good follow-up patch, but I'd keep that separate
from the regression fix.

Arnd