RE: [PATCH v9 2/8] PCI: imx6: Add the error propagation from host_init

From: Hongxing Zhu
Date: Thu Jun 09 2022 - 02:19:35 EST


> -----Original Message-----
> From: Bjorn Helgaas <helgaas@xxxxxxxxxx>
> Sent: 2022年6月9日 2:53
> To: Hongxing Zhu <hongxing.zhu@xxxxxxx>
> Cc: l.stach@xxxxxxxxxxxxxx; bhelgaas@xxxxxxxxxx; robh+dt@xxxxxxxxxx;
> broonie@xxxxxxxxxx; lorenzo.pieralisi@xxxxxxx; jingoohan1@xxxxxxxxx;
> festevam@xxxxxxxxx; francesco.dolcini@xxxxxxxxxxx;
> linux-pci@xxxxxxxxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx;
> linux-kernel@xxxxxxxxxxxxxxx; kernel@xxxxxxxxxxxxxx; dl-linux-imx
> <linux-imx@xxxxxxx>
> Subject: Re: [PATCH v9 2/8] PCI: imx6: Add the error propagation from
> host_init
>
> On Fri, May 06, 2022 at 09:47:03AM +0800, Richard Zhu wrote:
> > Since there is error return check of the host_init callback, add error
> > check to imx6_pcie_deassert_core_reset() function, and change the
> > function type accordingly.
>
> > @@ -878,11 +879,18 @@ static int imx6_pcie_start_link(struct dw_pcie
> > *pci) static int imx6_pcie_host_init(struct pcie_port *pp) {
> > struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
> > + struct device *dev = pci->dev;
> > struct imx6_pcie *imx6_pcie = to_imx6_pcie(pci);
> > + int ret;
> >
> > imx6_pcie_assert_core_reset(imx6_pcie);
> > imx6_pcie_init_phy(imx6_pcie);
> > - imx6_pcie_deassert_core_reset(imx6_pcie);
> > + ret = imx6_pcie_deassert_core_reset(imx6_pcie);
> > + if (ret < 0) {
> > + dev_err(dev, "pcie host init failed: %d.\n", ret);
>
> Other messages from this driver do not include a trailing period.
Okay, to keep alignment, would remove the trailing period.
Thanks.

Best Regards
Richard Zhu