From: sashiko-bot@kernel.org
To: "Fabio Forni" <development@redaril.me>
Cc: linux-gpio@vger.kernel.org
Subject: Re: [PATCH v5 2/3] mux: convert to use fwnode interface
Date: Sat, 28 Nov 2026 10:53:52 +0000 [thread overview]
Message-ID: <sashiko-outbox-238637@kernel.org> (raw)
In-Reply-To: <20261128-mux_fwnode-v5-2-6689b52f3800@redaril.me>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] mux: missing !CONFIG_MULTIPLEXER stub for
devm_mux_state_get_from_fwnode()
--
commit 85df2293bc5cfb5c47da8e60c377e0e2a2ce0040
Author: Fabio Forni <development@redaril.me>
mux: convert to use fwnode interface
This commit converts the multiplexer core and consumer lookup interface from
Device Tree device_node APIs to fwnode APIs.
> diff --git a/include/linux/mux/consumer.h b/include/linux/mux/consumer.h
> index 449e38e6e2c51..7d121217ca961 100644
> --- a/include/linux/mux/consumer.h
> +++ b/include/linux/mux/consumer.h
> @@ -11,6 +11,7 @@
> #define _LINUX_MUX_CONSUMER_H
>
> #include <linux/compiler.h>
> +#include <linux/device.h>
>
> struct device;
> struct mux_control;
> @@ -62,7 +63,8 @@ void mux_control_put(struct mux_control *mux);
> struct mux_control *devm_mux_control_get(struct device *dev, const char *mux_name);
>
> struct mux_state *
> -devm_mux_state_get_from_np(struct device *dev, const char *mux_name, struct device_node *np);
> +devm_mux_state_get_from_fwnode(struct device *dev, const char *mux_name,
> + struct fwnode_handle *node);
>
> struct mux_state *devm_mux_state_get_optional(struct device *dev, const char *mux_name);
> struct mux_state *devm_mux_state_get_selected(struct device *dev, const char *mux_name);
> @@ -165,6 +167,6 @@ static inline struct mux_state *devm_mux_state_get_optional_selected(struct devi
> #endif /* CONFIG_MULTIPLEXER */
>
> #define devm_mux_state_get(dev, mux_name) \
> - devm_mux_state_get_from_np(dev, mux_name, NULL)
> + devm_mux_state_get_from_fwnode(dev, mux_name, NULL)
>
> #endif /* _LINUX_MUX_CONSUMER_H */
[Severity: Medium]
Should the !CONFIG_MULTIPLEXER branch in include/linux/mux/consumer.h define
a stub for devm_mux_state_get_from_fwnode() instead of devm_mux_state_get()?
The #else block still defines a static inline stub for devm_mux_state_get(),
which is shadowed by the unconditional macro below it, leaving
devm_mux_state_get_from_fwnode() undeclared when CONFIG_MULTIPLEXER is
disabled.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261128-mux_fwnode-v5-0-6689b52f3800@redaril.me?part=2
next prev parent reply other threads:[~2026-11-28 10:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-28 10:43 [PATCH v5 0/3] Migrate the multiplexer subsystem to fwnode Fabio Forni via B4 Relay
2026-11-28 10:43 ` [PATCH v5 1/3] mux: Avoid use-after-free of args.np in mux_get() Fabio Forni via B4 Relay
2026-11-28 10:43 ` [PATCH v5 2/3] mux: convert to use fwnode interface Fabio Forni via B4 Relay
2026-11-28 10:53 ` sashiko-bot [this message]
2026-11-28 10:43 ` [PATCH v5 3/3] mux: Document mux_chip_find_by_fwnode() Fabio Forni via B4 Relay
2026-11-28 12:16 ` [PATCH v5 0/3] Migrate the multiplexer subsystem to fwnode Fabio Forni
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=sashiko-outbox-238637@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=development@redaril.me \
--cc=linux-gpio@vger.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