Hi Bjorn, Thanks for your improvement. I notice my new patches to add support arm32 and arm64 for designware and layerscape also have the similar issues, I will fix and submit them v2 . Could you tell me whether it is acceptable that I add a new file pcie-designware-base.c to re-implement designware PCIe driver for compatible with arm32 and arm64. The benefit is that the new implementation is simple clear and platform-independent. In addition, MSI driver will be split to a separate file. But we may need to push other platform PCIe maintainer to port the driver based on pcie-designware-base.c . Thanks, Minghuan > -----Original Message----- > From: Bjorn Helgaas [mailto:bhelgaas@xxxxxxxxxx] > Sent: Friday, April 10, 2015 3:49 AM > To: Lian Minghuan-B31939; Hu Mingkai-B21284; Zang Roy-R61911 > Cc: linux-pci@xxxxxxxxxxxxxxx > Subject: [PATCH] PCI: layerscape: Simplify platform_get_resource_byname() > failure checking > > devm_ioremap_resource() validates the resource it receives, so if we check > for devm_ioremap_resource() failure, we need not check for failure of the > preceding platform_get_resource(). > > Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx> > --- > drivers/pci/host/pci-layerscape.c | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci- > layerscape.c > index 68c9e5e9b0a8..4a6e62f67579 100644 > --- a/drivers/pci/host/pci-layerscape.c > +++ b/drivers/pci/host/pci-layerscape.c > @@ -127,14 +127,11 @@ static int __init ls_pcie_probe(struct > platform_device *pdev) > pcie->dev = &pdev->dev; > > dbi_base = platform_get_resource_byname(pdev, > IORESOURCE_MEM, "regs"); > - if (!dbi_base) { > - dev_err(&pdev->dev, "missing *regs* space\n"); > - return -ENODEV; > - } > - > pcie->dbi = devm_ioremap_resource(&pdev->dev, dbi_base); > - if (IS_ERR(pcie->dbi)) > + if (IS_ERR(pcie->dbi)) { > + dev_err(&pdev->dev, "missing *regs* space\n"); > return PTR_ERR(pcie->dbi); > + } > > pcie->scfg = syscon_regmap_lookup_by_phandle(pdev- > >dev.of_node, > "fsl,pcie-scfg"); ��.n��������+%������w��{.n�����{���"�)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥