Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4bb66691 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

PCI/MSI: Use dev_printk() when possible



Use dev_printk() when possible.  This makes messages more consistent with
other device-related messages and, in some cases, adds useful information.
This changes messages like this:

  Unable to allocate affinity masks, ignoring

to this:

  pci 0000:01:00.0: can't allocate MSI affinity masks for 4 vectors

Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent a26356ab
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -541,7 +541,8 @@ msi_setup_entry(struct pci_dev *dev, int nvec, const struct irq_affinity *affd)
	if (affd) {
		masks = irq_create_affinity_masks(nvec, affd);
		if (!masks)
			pr_err("Unable to allocate affinity masks, ignoring\n");
			dev_err(&dev->dev, "can't allocate MSI affinity masks for %d vectors\n",
				nvec);
	}

	/* MSI Entry Initialization */
@@ -681,7 +682,8 @@ static int msix_setup_entries(struct pci_dev *dev, void __iomem *base,
	if (affd) {
		masks = irq_create_affinity_masks(nvec, affd);
		if (!masks)
			pr_err("Unable to allocate affinity masks, ignoring\n");
			dev_err(&dev->dev, "can't allocate MSI-X affinity masks for %d vectors\n",
				nvec);
	}

	for (i = 0, curmsk = masks; i < nvec; i++) {