From: sashiko-bot@kernel.org
To: "Gregor Herburger" <gregor.herburger@linutronix.de>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v6 01/10] soc: bcm2835: Use IS_REACHABLE for function declaration
Date: Fri, 22 May 2026 16:00:06 +0000 [thread overview]
Message-ID: <20260522160006.F12121F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260522-rpi-otp-driver-v6-1-b0eac97d1428@linutronix.de>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Replacing IS_ENABLED() with IS_REACHABLE() introduces silent runtime failures (such as infinite probe-deferral loops or silently failing operations) by hiding unresolved module dependencies behind inline stubs.
--
commit 4df320b82133df67fcde1204534b53b54b092612
Author: Gregor Herburger <gregor.herburger@linutronix.de>
soc: bcm2835: Use IS_REACHABLE for function declaration
This commit modifies the raspberrypi-firmware header to use IS_REACHABLE
instead of IS_ENABLED for function declarations. It aims to simplify
Kconfig dependencies for dependent drivers while avoiding linker errors
during COMPILE_TEST builds where the firmware is modular.
> diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h
> index e1f87fbfe5542..eb33838e0cd10 100644
> --- a/include/soc/bcm2835/raspberrypi-firmware.h
> +++ b/include/soc/bcm2835/raspberrypi-firmware.h
> @@ -174,7 +174,7 @@ struct rpi_firmware_clk_rate_request {
> .id = cpu_to_le32(_id), \
> }
>
> -#if IS_ENABLED(CONFIG_RASPBERRYPI_FIRMWARE)
> +#if IS_REACHABLE(CONFIG_RASPBERRYPI_FIRMWARE)
[Severity: High]
Could this change introduce silent runtime failures for dependent drivers?
When a dependent driver is compiled as built-in (=y) via COMPILE_TEST while
the firmware is compiled as a module (=m), IS_REACHABLE evaluates to false.
This causes the compiler to silently substitute hardcoded inline stubs
instead of linking against the real firmware functions.
Consequently, the build succeeds but the drivers might fundamentally fail at
runtime. For example, devm_rpi_firmware_get() returning NULL could cause a
permanent -EPROBE_DEFER loop, or rpi_firmware_property() returning -ENOSYS
might break all NVMEM reads and writes.
The previous Kconfig dependency forced dependent drivers to =m in this
scenario, guaranteeing functional runtime behavior and using linker errors
to enforce correct configurations. Does using IS_REACHABLE here mask these
module dependencies in a way that breaks the drivers at runtime?
> int rpi_firmware_property(struct rpi_firmware *fw,
> u32 tag, void *data, size_t len);
> int rpi_firmware_property_list(struct rpi_firmware *fw,
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260522-rpi-otp-driver-v6-0-b0eac97d1428@linutronix.de?part=1
next prev parent reply other threads:[~2026-05-22 16:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 15:40 [PATCH v6 00/10] nvmem: Add Raspberry Pi OTP nvmem driver Gregor Herburger
2026-05-22 15:40 ` [PATCH v6 01/10] soc: bcm2835: Use IS_REACHABLE for function declaration Gregor Herburger
2026-05-22 16:00 ` sashiko-bot [this message]
2026-05-22 15:40 ` [PATCH v6 02/10] nvmem: core: Enforce stride and alignment checks for nvmem_device functions Gregor Herburger
2026-05-22 15:40 ` [PATCH v6 03/10] dt-bindings: raspberrypi,bcm2835-firmware: Add bcm2712-firmware compatible Gregor Herburger
2026-05-22 15:40 ` [PATCH v6 04/10] nvmem: Add the Raspberry Pi OTP driver Gregor Herburger
2026-05-22 18:18 ` sashiko-bot
2026-05-22 15:40 ` [PATCH v6 05/10] firmware: raspberrypi: register nvmem driver Gregor Herburger
2026-05-22 15:40 ` [PATCH v6 06/10] arm64: dts: broadcom: bcm2712: add raspberrypi,bcm2712-firmware compatible Gregor Herburger
2026-05-22 15:40 ` [PATCH v6 07/10] dt-bindings: raspberrypi,bcm2835-firmware: Drop unnecessary select Gregor Herburger
2026-05-22 15:40 ` [PATCH v6 08/10] arm64: defconfig: Enable the raspberrypi otp driver as module Gregor Herburger
2026-05-22 15:40 ` [PATCH v6 09/10] ARM: bcm2835_defconfig: " Gregor Herburger
2026-05-22 15:40 ` [PATCH v6 10/10] ARM: multi_v7_defconfig: " Gregor Herburger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260522160006.F12121F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregor.herburger@linutronix.de \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox