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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250715184917.GA2479996@bhelgaas>
Date: Tue, 15 Jul 2025 13:49:17 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: "Jiri Slaby (SUSE)" <jirislaby@...nel.org>
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de,
	Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
	Nam Cao <namcao@...utronix.de>
Subject: Re: [PATCH] pci/controller: Use dev_fwnode()

[+cc Nam]

On Wed, Jun 11, 2025 at 12:43:44PM +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.
> 
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@...nel.org>
> Cc: Bjorn Helgaas <bhelgaas@...gle.com>
> Cc: linux-pci@...r.kernel.org
> ---
>  drivers/pci/controller/mobiveil/pcie-mobiveil-host.c | 5 ++---
>  drivers/pci/controller/pcie-mediatek-gen3.c          | 3 +--

I think the pcie-mediatek-gen3.c part of this is no longer relevant
after Nam's series [1].  This pcie-mediatek-gen3.c was the only thing
on the pci/controller/mediatek-gen3 branch, so I'm going to drop that
for now.

The pcie-mobiveil-host.c part is still queued on
pci/controller/mobiveil for v6.17.

[1] https://patch.msgid.link/bfbd2e375269071b69e1aa85e629ee4b7c99518f.1750858083.git.namcao@linutronix.de

>  2 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c b/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
> index a600f46ee3c3..cd44ddb698ea 100644
> --- a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
> +++ b/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
> @@ -464,9 +464,8 @@ static int mobiveil_pcie_init_irq_domain(struct mobiveil_pcie *pcie)
>  	struct mobiveil_root_port *rp = &pcie->rp;
>  
>  	/* setup INTx */
> -	rp->intx_domain = irq_domain_create_linear(of_fwnode_handle(dev->of_node), PCI_NUM_INTX,
> -						   &intx_domain_ops, pcie);
> -
> +	rp->intx_domain = irq_domain_create_linear(dev_fwnode(dev), PCI_NUM_INTX, &intx_domain_ops,
> +						   pcie);
>  	if (!rp->intx_domain) {
>  		dev_err(dev, "Failed to get a INTx IRQ domain\n");
>  		return -ENOMEM;
> diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c
> index b55f5973414c..5464b4ae5c20 100644
> --- a/drivers/pci/controller/pcie-mediatek-gen3.c
> +++ b/drivers/pci/controller/pcie-mediatek-gen3.c
> @@ -756,8 +756,7 @@ static int mtk_pcie_init_irq_domains(struct mtk_gen3_pcie *pcie)
>  	/* Setup MSI */
>  	mutex_init(&pcie->lock);
>  
> -	pcie->msi_bottom_domain = irq_domain_create_linear(of_fwnode_handle(node),
> -							   PCIE_MSI_IRQS_NUM,
> +	pcie->msi_bottom_domain = irq_domain_create_linear(dev_fwnode(dev), PCIE_MSI_IRQS_NUM,
>  							   &mtk_msi_bottom_domain_ops, pcie);
>  	if (!pcie->msi_bottom_domain) {
>  		dev_err(dev, "failed to create MSI bottom domain\n");
> -- 
> 2.49.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ