From: sashiko-bot@kernel.org
To: "Gregor Herburger" <gregor.herburger@linutronix.de>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 1/8] soc: bcm2835: Use IS_REACHABLE for function declaration
Date: Wed, 20 May 2026 14:40:59 +0000 [thread overview]
Message-ID: <20260520144059.C8B161F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260520-rpi-otp-driver-v5-1-b26e5908eeac@linutronix.de>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Misuse of IS_REACHABLE to hide Kconfig dependency mismatches, leading to silent runtime failures.
--
commit dcaefe39201e65d292203c3c769d9af92e05fa3c
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(). The goal is to simplify Kconfig dependencies for
drivers relying on RASPBERRYPI_FIRMWARE and avoid linker errors when
COMPILE_TEST is enabled.
> 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: Medium]
Does using IS_REACHABLE() here risk silent runtime failures?
If a dependent driver is built-in (=y) while RASPBERRYPI_FIRMWARE=m
(which becomes possible when changing the Kconfig to just
depends on RASPBERRYPI_FIRMWARE || COMPILE_TEST), IS_REACHABLE() evaluates
to false.
Instead of Kbuild catching the dependency mismatch with a visible link error,
the compiler will silently substitute dummy inline implementations for the
firmware API calls. This allows the built-in driver to compile and link
successfully, but it will fail at runtime (e.g., rpi_firmware_get()
returning NULL).
Was the original Kconfig expression explicitly structured to catch this
built-in vs module dependency mismatch at configuration time rather than
hiding it at runtime?
> int rpi_firmware_property(struct rpi_firmware *fw,
> u32 tag, void *data, size_t len);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260520-rpi-otp-driver-v5-0-b26e5908eeac@linutronix.de?part=1
next prev parent reply other threads:[~2026-05-20 14:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 14:27 [PATCH v5 0/8] nvmem: Add Raspberry Pi OTP nvmem driver Gregor Herburger
2026-05-20 14:27 ` [PATCH v5 1/8] soc: bcm2835: Use IS_REACHABLE for function declaration Gregor Herburger
2026-05-20 14:40 ` sashiko-bot [this message]
2026-05-21 14:32 ` Thomas Weißschuh
2026-05-20 14:27 ` [PATCH v5 2/8] nvmem: core: Enforce stride and alignment checks for nvmem_device functions Gregor Herburger
2026-05-20 16:08 ` sashiko-bot
2026-05-21 14:32 ` Thomas Weißschuh
2026-05-20 14:27 ` [PATCH v5 3/8] dt-bindings: raspberrypi,bcm2835-firmware: Add bcm2712-firmware compatible Gregor Herburger
2026-05-20 14:27 ` [PATCH v5 4/8] nvmem: Add the Raspberry Pi OTP driver Gregor Herburger
2026-05-20 16:50 ` sashiko-bot
2026-05-21 14:34 ` Thomas Weißschuh
2026-05-20 14:27 ` [PATCH v5 5/8] firmware: raspberrypi: register nvmem driver Gregor Herburger
2026-05-20 17:20 ` sashiko-bot
2026-05-21 14:38 ` Thomas Weißschuh
2026-05-20 14:27 ` [PATCH v5 6/8] arm64: dts: broadcom: bcm2712: add raspberrypi,bcm2712-firmware compatible Gregor Herburger
2026-05-20 14:27 ` [PATCH v5 7/8] dt-bindings: raspberrypi,bcm2835-firmware: Drop unnecessary select Gregor Herburger
2026-05-21 7:11 ` Krzysztof Kozlowski
2026-05-20 14:28 ` [PATCH v5 8/8] arm64: defconfig: Enable the raspberrypi otp driver as module Gregor Herburger
2026-05-21 7:09 ` Krzysztof Kozlowski
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=20260520144059.C8B161F000E9@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.