Skip to contentSkip to conversation

PCI: altera: use fwnode API for pci_msi_create_irq_domain

PATCH In review Arnd Bergmann 3 participants 4 messages Nov 4, 2015 – Nov 5, 2015 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: altera: use fwnode API for pci_msi_create_irq_domain

There is a new conflict between Thomas Gleixner's IRQ tree that contains a patch from Marc Zyngier to change the prototype for pci_msi_create_irq_domain, and Bjorn Helgaas' PCI tree that contains a new driver for the Altera PCI MSI host, with the old interface, as gcc now warns in linux-next:

drivers/pci/host/pcie-altera-msi.c: In function 'altera_allocate_domains':
drivers/pci/host/pcie-altera-msi.c:191:46: warning: passing argument 1 of 'pci_msi_create_irq_domain' from incompatible pointer type [-Wincompatible-pointer-types]
msi->msi_domain = pci_msi_create_irq_domain(msi->pdev->dev.of_node,
include/linux/msi.h:286:20: note: expected 'struct fwnode_handle *' but argument is of type 'struct device_node *'

This changes the new driver use the modified API.

Fixes af1169b48b17 ("PCI: altera: Add Altera PCIe MSI driver")
Fixes be5436c83ac8 ("irqdomain/msi: Use fwnode instead of of_node")

---
This conflict seems to be new in linux-next today. Any idea how to resolve it?

I think either Bjorn merges the msi-map-4.4 of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms and uses this as the resolution, or whichever pull request comes second should let Linus
know about the conflict so he can do it when merging both.

drivers/pci/host/pcie-altera-msi.c +3 -1
index 2c37e8620c37..99177f4ccde2 100644
@@ -181,6 +181,8 @@ static const struct irq_domain_ops msi_domain_ops = {
 
 static int altera_allocate_domains(struct altera_msi *msi)
 {
+	struct fwnode_handle *fwnode = of_node_to_fwnode(msi->pdev->dev.of_node);
+
 	msi->inner_domain = irq_domain_add_linear(NULL, msi->num_of_vectors,
 					     &msi_domain_ops, msi);
 	if (!msi->inner_domain) {
@@ -188,7 +190,7 @@ static int altera_allocate_domains(struct altera_msi *msi)
 		return -ENOMEM;
 	}
 
-	msi->msi_domain = pci_msi_create_irq_domain(msi->pdev->dev.of_node,
+	msi->msi_domain = pci_msi_create_irq_domain(fwnode,
 				&altera_msi_domain_info, msi->inner_domain);
 	if (!msi->msi_domain) {
 		dev_err(&msi->pdev->dev, "failed to create MSI domain\n");
#1 lore raw
Quoted 16 lines · Arnd Bergmann

There is a new conflict between Thomas Gleixner's IRQ tree that contains a patch from Marc Zyngier to change the prototype for pci_msi_create_irq_domain, and Bjorn Helgaas' PCI tree that contains a new driver for the Altera PCI MSI host, with the old interface, as gcc now warns in linux-next:

drivers/pci/host/pcie-altera-msi.c: In function 'altera_allocate_domains':
drivers/pci/host/pcie-altera-msi.c:191:46: warning: passing argument 1 of 'pci_msi_create_irq_domain' from incompatible pointer type [-Wincompatible-pointer-types]
msi->msi_domain = pci_msi_create_irq_domain(msi->pdev->dev.of_node,
include/linux/msi.h:286:20: note: expected 'struct fwnode_handle *' but argument is of type 'struct device_node *'

This changes the new driver use the modified API.

Fixes af1169b48b17 ("PCI: altera: Add Altera PCIe MSI driver")
Fixes be5436c83ac8 ("irqdomain/msi: Use fwnode instead of of_node")
Quoted 6 lines

---
This conflict seems to be new in linux-next today. Any idea how to resolve it?

I think either Bjorn merges the msi-map-4.4 of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms and uses this as the resolution, or whichever pull request comes second should let Linus
know about the conflict so he can do it when merging both.

The irq/core stuff which contains Marcs msi map stuff has hit Linus tree already.

Thanks,

tglx

#2 lore raw
Quoted 20 lines · On Wednesday 04 November 2015 13:45:23 Thomas Gleixner wrote:
Quoted 19 lines · Arnd Bergmann

There is a new conflict between Thomas Gleixner's IRQ tree that contains a patch from Marc Zyngier to change the prototype for pci_msi_create_irq_domain, and Bjorn Helgaas' PCI tree that contains a new driver for the Altera PCI MSI host, with the old interface, as gcc now warns in linux-next:

drivers/pci/host/pcie-altera-msi.c: In function 'altera_allocate_domains':
drivers/pci/host/pcie-altera-msi.c:191:46: warning: passing argument 1 of 'pci_msi_create_irq_domain' from incompatible pointer type [-Wincompatible-pointer-types]
msi->msi_domain = pci_msi_create_irq_domain(msi->pdev->dev.of_node,
include/linux/msi.h:286:20: note: expected 'struct fwnode_handle *' but argument is of type 'struct device_node *'

This changes the new driver use the modified API.

Fixes af1169b48b17 ("PCI: altera: Add Altera PCIe MSI driver")
Fixes be5436c83ac8 ("irqdomain/msi: Use fwnode instead of of_node")

---
This conflict seems to be new in linux-next today. Any idea how to resolve it?

Quoted 7 lines
Quoted 3 lines

I think either Bjorn merges the msi-map-4.4 of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms and uses this as the resolution, or whichever pull request comes second should let Linus
know about the conflict so he can do it when merging both.

The irq/core stuff which contains Marcs msi map stuff has hit Linus tree already.

Ah, I see. Maybe that's why it showed up now, when Stephen had a fixup for it in linux-next and that got dropped after the merge. I guess Bjorn can pick either approach then, to get the correct merge done.

Thanks,

Arnd

Acked-by on v1 1/1
#3 lore raw
In reply to Arnd Bergmann
Quoted 11 lines · Arnd Bergmann

There is a new conflict between Thomas Gleixner's IRQ tree that contains a patch from Marc Zyngier to change the prototype for pci_msi_create_irq_domain, and Bjorn Helgaas' PCI tree that contains a new driver for the Altera PCI MSI host, with the old interface, as gcc now warns in linux-next:

drivers/pci/host/pcie-altera-msi.c: In function 'altera_allocate_domains':
drivers/pci/host/pcie-altera-msi.c:191:46: warning: passing argument 1 of 'pci_msi_create_irq_domain' from incompatible pointer type [-Wincompatible-pointer-types]
msi->msi_domain = pci_msi_create_irq_domain(msi->pdev->dev.of_node,
include/linux/msi.h:286:20: note: expected 'struct fwnode_handle *' but argument is of type 'struct device_node *'

Quoted 5 lines

This changes the new driver use the modified API.

Fixes af1169b48b17 ("PCI: altera: Add Altera PCIe MSI driver")
Fixes be5436c83ac8 ("irqdomain/msi: Use fwnode instead of of_node")

Thanks for the fix.

Regards
Ley Foon