Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp4153102pxa; Mon, 10 Aug 2020 02:03:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2pj+0/cfHZLlMLHdIWsTFtYHT4JXvMbZ08v0LFs0cPY1rvozZd6ccVY+OvLK0AlXupQWW X-Received: by 2002:a17:906:57ca:: with SMTP id u10mr14061247ejr.290.1597050233604; Mon, 10 Aug 2020 02:03:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597050233; cv=none; d=google.com; s=arc-20160816; b=PgLu4y3ImlCoU5Y3JqQkHg1g/Fjxk+8Fi7EE4llRjcFUP3+XC9RL7OTs0q8TvHi+4G lYwetJ5D8KEBY7vzitk4rF99c8rqqGzlgh/g1y1r9BwJHJtEDmpb4+v75KRlDHxCRbJF m1J0BwF1rHD85vMMfY31jTITNbltvAIKaPJ6Yo0trHB4q/4Mpo0mPJtuqBEEsX1BQ9zI oV7olxWLrAyBu+2c5Hj23jrmb/yODeS4gw3iY5UarNZQ56d6KIFPQuevENeuXTQhwee6 HhDTKBQf8mvmjHlBpa5T49TeDHzVGC4x7Oc2nHwb5Cr5HKkH2VrzPyanAWFg2+TggA9n kOBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=1qaVGcKV5Ga1OdpLfaBhnQjmMN12XR7FJcTO09emWf4=; b=zWsPC39TXJCcCS4rLO7gLN6hsJoLOb2Yg0utSKsSskdCWE7XWh4Fk7r5WoRruFB23k 3qhNy0uhHPyTGaGnAjqVxR8sx1f8OtMXtov49SwV4bHrYC9Etl4/DBpnUNlee9ufvBDM AOigXpjVwoCPgYAZA5QB0l+wMjkM+/znWDy0hJ2N4ks22p1iJkMEt5b2GcCmsYP/TUoS yIxUNGmznO6NHhW5+9eoFhz9IHfvN/HIU+rhXtt5w/xKY785omiomTH+1PEbV0hRsxZo htMKDaUuABs42IjT3Gv5KAJbTch/bNLHA/u3sF10f/dOsMaDnXzRYeIyBmlvSYp4vgLW YUMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i23si10575259edb.556.2020.08.10.02.03.30; Mon, 10 Aug 2020 02:03:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726531AbgHJJC1 (ORCPT + 99 others); Mon, 10 Aug 2020 05:02:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726177AbgHJJC1 (ORCPT ); Mon, 10 Aug 2020 05:02:27 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42476C061756 for ; Mon, 10 Aug 2020 02:02:27 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=localhost) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k53hE-0000O3-4f; Mon, 10 Aug 2020 11:02:20 +0200 Message-ID: Subject: Re: [PATCH] PCI: imx6: Do not output error message when devm_clk_get() failed with -EPROBE_DEFER From: Lucas Stach To: Anson Huang , hongxing.zhu@nxp.com, lorenzo.pieralisi@arm.com, robh@kernel.org, bhelgaas@google.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Date: Mon, 10 Aug 2020 11:02:18 +0200 In-Reply-To: <1596519481-28072-1-git-send-email-Anson.Huang@nxp.com> References: <1596519481-28072-1-git-send-email-Anson.Huang@nxp.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.3 (3.36.3-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Dienstag, den 04.08.2020, 13:38 +0800 schrieb Anson Huang: > When devm_clk_get() returns -EPROBE_DEFER, i.MX6 PCI driver should > NOT print error message, just return -EPROBE_DEFER is enough. The reasoning behind this change is fine, but I think we should use the recently merged dev_err_probe() helper to achieve the same goal. Regards, Lucas > Signed-off-by: Anson Huang > --- > drivers/pci/controller/dwc/pci-imx6.c | 30 ++++++++++++++++++++---------- > 1 file changed, 20 insertions(+), 10 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c > index 4e5c379..ee75d35 100644 > --- a/drivers/pci/controller/dwc/pci-imx6.c > +++ b/drivers/pci/controller/dwc/pci-imx6.c > @@ -1076,20 +1076,26 @@ static int imx6_pcie_probe(struct platform_device *pdev) > /* Fetch clocks */ > imx6_pcie->pcie_phy = devm_clk_get(dev, "pcie_phy"); > if (IS_ERR(imx6_pcie->pcie_phy)) { > - dev_err(dev, "pcie_phy clock source missing or invalid\n"); > - return PTR_ERR(imx6_pcie->pcie_phy); > + ret = PTR_ERR(imx6_pcie->pcie_phy); > + if (ret != -EPROBE_DEFER) > + dev_err(dev, "pcie_phy clock source missing or invalid\n"); > + return ret; > } > > imx6_pcie->pcie_bus = devm_clk_get(dev, "pcie_bus"); > if (IS_ERR(imx6_pcie->pcie_bus)) { > - dev_err(dev, "pcie_bus clock source missing or invalid\n"); > - return PTR_ERR(imx6_pcie->pcie_bus); > + ret = PTR_ERR(imx6_pcie->pcie_bus); > + if (ret != -EPROBE_DEFER) > + dev_err(dev, "pcie_bus clock source missing or invalid\n"); > + return ret; > } > > imx6_pcie->pcie = devm_clk_get(dev, "pcie"); > if (IS_ERR(imx6_pcie->pcie)) { > - dev_err(dev, "pcie clock source missing or invalid\n"); > - return PTR_ERR(imx6_pcie->pcie); > + ret = PTR_ERR(imx6_pcie->pcie); > + if (ret != -EPROBE_DEFER) > + dev_err(dev, "pcie clock source missing or invalid\n"); > + return ret; > } > > switch (imx6_pcie->drvdata->variant) { > @@ -1097,15 +1103,19 @@ static int imx6_pcie_probe(struct platform_device *pdev) > imx6_pcie->pcie_inbound_axi = devm_clk_get(dev, > "pcie_inbound_axi"); > if (IS_ERR(imx6_pcie->pcie_inbound_axi)) { > - dev_err(dev, "pcie_inbound_axi clock missing or invalid\n"); > - return PTR_ERR(imx6_pcie->pcie_inbound_axi); > + ret = PTR_ERR(imx6_pcie->pcie_inbound_axi); > + if (ret != -EPROBE_DEFER) > + dev_err(dev, "pcie_inbound_axi clock missing or invalid\n"); > + return ret; > } > break; > case IMX8MQ: > imx6_pcie->pcie_aux = devm_clk_get(dev, "pcie_aux"); > if (IS_ERR(imx6_pcie->pcie_aux)) { > - dev_err(dev, "pcie_aux clock source missing or invalid\n"); > - return PTR_ERR(imx6_pcie->pcie_aux); > + ret = PTR_ERR(imx6_pcie->pcie_aux); > + if (ret != -EPROBE_DEFER) > + dev_err(dev, "pcie_aux clock source missing or invalid\n"); > + return ret; > } > /* fall through */ > case IMX7D: