PCI: Move informational printk to pci_add_dma_alias()
authorBjorn Helgaas <bhelgaas@google.com>
Wed, 24 Feb 2016 19:43:54 +0000 (13:43 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 11 Apr 2016 19:34:27 +0000 (14:34 -0500)
One of the quirks that adds DMA aliases logs an informational message in
dmesg.  Move that to pci_add_dma_alias() so all users log the message
consistently.  No functional change intended (except extra message).

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
drivers/pci/pci.c
drivers/pci/quirks.c

index 1162118d1093b131d2b456b2ea791d7f0b6f7334..c82ebd0f698271abc85206c73c095ba07d89e778 100644 (file)
@@ -4590,6 +4590,8 @@ void pci_add_dma_alias(struct pci_dev *dev, u8 devfn)
 {
        dev->dma_alias_devfn = devfn;
        dev->dev_flags |= PCI_DEV_FLAGS_DMA_ALIAS_DEVFN;
+       dev_info(&dev->dev, "Enabling fixed DMA alias to %02x.%d\n",
+                PCI_SLOT(devfn), PCI_FUNC(devfn));
 }
 
 bool pci_device_is_present(struct pci_dev *pdev)
index e45a7a8338bb9b5d5f92fffd3201f20130f2de30..7559e4024447980f1c2117e8cc5a1503f63bc1be 100644 (file)
@@ -3691,12 +3691,8 @@ static void quirk_fixed_dma_alias(struct pci_dev *dev)
        const struct pci_device_id *id;
 
        id = pci_match_id(fixed_dma_alias_tbl, dev);
-       if (id) {
+       if (id)
                pci_add_dma_alias(dev, id->driver_data);
-               dev_info(&dev->dev, "Enabling fixed DMA alias to %02x.%d\n",
-                        PCI_SLOT(id->driver_data),
-                        PCI_FUNC(id->driver_data));
-       }
 }
 
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ADAPTEC2, 0x0285, quirk_fixed_dma_alias);