[PATCH v5 1/8] soc: bcm2835: Use IS_REACHABLE for function declaration
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Thu May 21 07:32:15 PDT 2026
On Wed, May 20, 2026 at 04:27:53PM +0200, Gregor Herburger wrote:
> The drivers that depend on the RASPBERRYPI_FIRMWARE use
>
> depends on RASPBERRYPI_FIRMWARE || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE)
>
> This should ensure that the driver is not compiled in when
> RASPBERRYPI_FIRMWARE is 'm' on COMPILE_TEST which leads to linker
> errors.
>
> The same can be achieved by using IS_REACHABLE in the
> raspberrypi-firmware header. This evaluates to false when invoked from
> built-in code. This way the Kconfig can be written as
>
> depends on RASPBERRYPI_FIRMWARE || COMPILE_TEST
>
> Which is a more readable variant.
>
> Signed-off-by: Gregor Herburger <gregor.herburger at linutronix.de>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
(...)
More information about the linux-arm-kernel
mailing list