]> git.karo-electronics.de Git - linux-beck.git/commitdiff
PCI: designware: Remove redundant call to pci_write_config_word()
authorBjørn Erik Nilsen <ben@datarespons.no>
Fri, 29 Nov 2013 13:35:25 +0000 (14:35 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 9 Dec 2013 22:11:14 +0000 (15:11 -0700)
write_msi_msg() does exactly the same so there is no need to explicitly
call pci_write_config_word() and do the same twice.

Tested-by: Mohit Kumar <mohit.kumar@st.com>
Signed-off-by: Bjørn Erik Nilsen <ben@datarespons.no>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Jingoo Han <jg1.han@samsung.com>
drivers/pci/host/pcie-designware.c

index 61345a18a6d16ae7bb691665aa9dd2f03a055b51..5274085ecd4bc11b53df18465cb67c270e50ffad 100644 (file)
@@ -345,10 +345,10 @@ static int dw_msi_setup_irq(struct msi_chip *chip, struct pci_dev *pdev,
        if (irq < 0)
                return irq;
 
-       msg_ctr &= ~PCI_MSI_FLAGS_QSIZE;
-       msg_ctr |= msgvec << 4;
-       pci_write_config_word(pdev, desc->msi_attrib.pos + PCI_MSI_FLAGS,
-                               msg_ctr);
+       /*
+        * write_msi_msg() will update PCI_MSI_FLAGS so there is
+        * no need to explicitly call pci_write_config_word().
+        */
        desc->msi_attrib.multiple = msgvec;
 
        msg.address_lo = virt_to_phys((void *)pp->msi_data);