lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aEmeMOW5e3q9TrUu@smile.fi.intel.com>
Date: Wed, 11 Jun 2025 18:18:08 +0300
From: Andy Shevchenko <andy@...nel.org>
To: "Jiri Slaby (SUSE)" <jirislaby@...nel.org>
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de,
	Linus Walleij <linus.walleij@...aro.org>,
	Bartosz Golaszewski <brgl@...ev.pl>,
	Doug Berger <opendmb@...il.com>,
	Florian Fainelli <florian.fainelli@...adcom.com>,
	Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
	Keerthy <j-keerthy@...com>, Vladimir Zapolskiy <vz@...ia.com>,
	Uwe Kleine-König <ukleinek@...nel.org>,
	Shawn Guo <shawnguo@...nel.org>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Pengutronix Kernel Team <kernel@...gutronix.de>,
	Fabio Estevam <festevam@...il.com>,
	Robert Jarzmik <robert.jarzmik@...e.fr>,
	Heiko Stuebner <heiko@...ech.de>, linux-gpio@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-pwm@...r.kernel.org,
	imx@...ts.linux.dev, linux-rockchip@...ts.infradead.org
Subject: Re: [PATCH] gpio: Use dev_fwnode()

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



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ