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

Hongxing Zhu hongxing.zhu at nxp.com
Wed Jun 8 23:19:11 PDT 2022


> -----Original Message-----
> From: Bjorn Helgaas <helgaas at kernel.org>
> Sent: 2022年6月9日 2:53
> To: Hongxing Zhu <hongxing.zhu at nxp.com>
> Cc: l.stach at pengutronix.de; bhelgaas at google.com; robh+dt at kernel.org;
> broonie at kernel.org; lorenzo.pieralisi at arm.com; jingoohan1 at gmail.com;
> festevam at gmail.com; francesco.dolcini at toradex.com;
> linux-pci at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> linux-kernel at vger.kernel.org; kernel at pengutronix.de; dl-linux-imx
> <linux-imx at nxp.com>
> 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



More information about the linux-arm-kernel mailing list