On Mon, 2021-12-27 at 10:03 -0800, Guenter Roeck wrote: > On 12/27/21 8:43 AM, Niklas Schnelle wrote: > > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends > > not being declared. We thus need to add HAS_IOPORT as dependency for > > those drivers using them. > > > > How is the need for HAS_IOPORT determined, when exactly is it needed, > and when not ? I mostly used "make allyesconfig" on s390 with the accessors ifdeffed out (i.e. patch 32) to find where the I/O port accesses were compiled in. This means that it doesn't find drivers which pull in a HAS_IOPORT dependency transitively e.g. by depending on x86 or ACPI. It should get those that use e.g. "|| COMPILE_TEST" though. This might not be ideal but on the other hand it should catch all those drivers that currently built with known broken code. > > $ git grep -E "inb|inw" drivers/watchdog/ | cut -f1 -d: | sort -u > drivers/watchdog/acquirewdt.c > drivers/watchdog/advantechwdt.c > ---8<---