[Skiboot] [PATCH v2] Drop NULL check for phb/pd in pci_configure_mps()
Kamalesh Babulal
kamalesh at linux.vnet.ibm.com
Wed Jun 24 15:47:15 AEST 2015
Drop the check for NULL as chances of phb/pd being NULL,
when passed to pci_configure_mps() is zero.
Also fix couple of typo in the file.
Suggested-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
Signed-off-by: Kamalesh Babulal <kamalesh at linux.vnet.ibm.com>
Cc: Samuel Mendoza-Jonas <sam.mj at au1.ibm.com>
---
core/pci.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/core/pci.c b/core/pci.c
index 8f8aeeb..be74824 100644
--- a/core/pci.c
+++ b/core/pci.c
@@ -615,10 +615,7 @@ static int pci_configure_mps(struct phb *phb,
if (mps < 128 || mps > 4096)
return 1;
- if (!phb || !pd)
- return 0;
-
- /* PCIe deivce always has MPS capacity */
+ /* PCIe device always has MPS capacity */
if (pd->mps) {
ecap = pci_cap(pd, PCI_CFG_CAP_ID_EXP, false);
mps = ilog2(mps) - 7;
@@ -763,7 +760,7 @@ static void pci_scan_phb(void *data)
has_link ? "+downsteam" : " only");
pci_scan(phb, 0, 0xff, &phb->devices, NULL, has_link);
- /* Configre MPS (Max Payload Size) for PCIe domain */
+ /* Configure MPS (Max Payload Size) for PCIe domain */
pci_walk_dev(phb, pci_get_mps, &mps);
phb->mps = mps;
pci_walk_dev(phb, pci_configure_mps, NULL);
--
2.1.2
More information about the Skiboot
mailing list