Patchwork [v2] PCI: clean up dead code in pcie_get_mps()

login
register
mail settings
Submitter Yijing Wang
Date Aug. 19, 2013, 3:47 a.m.
Message ID <1376884020-37104-1-git-send-email-wangyijing@huawei.com>
Download mbox | patch
Permalink /patch/268074/
State Accepted
Headers show

Comments

Yijing Wang - Aug. 19, 2013, 3:47 a.m.
v1->v2: rename patch name and update patch log
        the v1 patch https://patchwork.kernel.org/patch/2837637/

After commit 59875ae489, pcie_get_mps() will never
return negative value. So we can remove two lines
of dead code.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
---
 drivers/pci/pci.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

Patch

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 10e3c4e..86beb31 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -3919,8 +3919,6 @@  int pcie_set_readrq(struct pci_dev *dev, int rq)
 	if (pcie_bus_config == PCIE_BUS_PERFORMANCE) {
 		int mps = pcie_get_mps(dev);
 
-		if (mps < 0)
-			return mps;
 		if (mps < rq)
 			rq = mps;
 	}