linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Cc: marc.zyngier@arm.com, linux-kernel@vger.kernel.org,
	tglx@linutronix.de, Ley Foon Tan <lftan@altera.com>
Subject: [PATCH] PCI: altera: use fwnode API for pci_msi_create_irq_domain
Date: Wed, 04 Nov 2015 13:39:42 +0100	[thread overview]
Message-ID: <4309044.Hy8Vx01ZVW@wuerfel> (raw)

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
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.

diff --git a/drivers/pci/host/pcie-altera-msi.c b/drivers/pci/host/pcie-altera-msi.c
index 2c37e8620c37..99177f4ccde2 100644
--- a/drivers/pci/host/pcie-altera-msi.c
+++ b/drivers/pci/host/pcie-altera-msi.c
@@ -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");


             reply	other threads:[~2015-11-04 12:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-04 12:39 Arnd Bergmann [this message]
2015-11-04 12:45 ` [PATCH] PCI: altera: use fwnode API for pci_msi_create_irq_domain Thomas Gleixner
2015-11-04 13:35   ` Arnd Bergmann
2015-11-05  1:55 ` Ley Foon Tan

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=4309044.Hy8Vx01ZVW@wuerfel \
    --to=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=lftan@altera.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).