From: Andy Shevchenko <andy@kernel.org>
To: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
"Linus Walleij" <linus.walleij@linaro.org>,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Doug Berger" <opendmb@gmail.com>,
"Florian Fainelli" <florian.fainelli@broadcom.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
Keerthy <j-keerthy@ti.com>, "Vladimir Zapolskiy" <vz@mleia.com>,
"Uwe Kleine-König" <ukleinek@kernel.org>,
"Shawn Guo" <shawnguo@kernel.org>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"Robert Jarzmik" <robert.jarzmik@free.fr>,
"Heiko Stuebner" <heiko@sntech.de>,
linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-pwm@vger.kernel.org, imx@lists.linux.dev,
linux-rockchip@lists.infradead.org
Subject: Re: [PATCH] gpio: Use dev_fwnode()
Date: Wed, 11 Jun 2025 18:18:08 +0300 [thread overview]
Message-ID: <aEmeMOW5e3q9TrUu@smile.fi.intel.com> (raw)
In-Reply-To: <20250611104348.192092-6-jirislaby@kernel.org>
On Wed, Jun 11, 2025 at 12:43:34PM +0200, Jiri Slaby (SUSE) wrote:
> irq_domain_create_simple() takes fwnode as the first argument. It can be
> extracted from the struct device using dev_fwnode() helper instead of
> using of_node with of_fwnode_handle().
>
> So use the dev_fwnode() helper.
Thanks for this change. See my nit-pick below.
...
> @@ -436,10 +436,8 @@ static int brcmstb_gpio_irq_setup(struct platform_device *pdev,
> struct device_node *np = dev->of_node;
> int err;
>
> - priv->irq_domain =
> - irq_domain_create_linear(of_fwnode_handle(np), priv->num_gpios,
> - &brcmstb_gpio_irq_domain_ops,
> - priv);
> + priv->irq_domain = irq_domain_create_linear(dev_fwnode(dev), priv->num_gpios,
> + &brcmstb_gpio_irq_domain_ops, priv);
In cases like this, I would rather see something like
struct fwnode_handle *fwnode = dev_fwnode(dev);
just near to the respective of node extraction. This will help to reduce churn
when converting the rest of the code to use fwnode instead of of_node/np.
> if (!priv->irq_domain) {
> dev_err(dev, "Couldn't allocate IRQ domain\n");
> return -ENXIO;
Other than that I appreciate the series!
--
With Best Regards,
Andy Shevchenko
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2025-06-11 19:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250611104348.192092-1-jirislaby@kernel.org>
2025-06-11 10:43 ` [PATCH] gpio: Use dev_fwnode() Jiri Slaby (SUSE)
2025-06-11 15:18 ` Andy Shevchenko [this message]
2025-06-16 7:42 ` Bartosz Golaszewski
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=aEmeMOW5e3q9TrUu@smile.fi.intel.com \
--to=andy@kernel.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=brgl@bgdev.pl \
--cc=festevam@gmail.com \
--cc=florian.fainelli@broadcom.com \
--cc=heiko@sntech.de \
--cc=imx@lists.linux.dev \
--cc=j-keerthy@ti.com \
--cc=jirislaby@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=opendmb@gmail.com \
--cc=robert.jarzmik@free.fr \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=tglx@linutronix.de \
--cc=ukleinek@kernel.org \
--cc=vz@mleia.com \
/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