Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1991200ybg; Fri, 5 Jun 2020 02:47:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxV27BTuP7Hu2OXf1ZDWbOeKNf7OLZmSNOcuePrtt/XjFFhzZNTzuIlL91qGXPlDvYeByNi X-Received: by 2002:a17:906:6a4b:: with SMTP id n11mr7603069ejs.198.1591350421084; Fri, 05 Jun 2020 02:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591350421; cv=none; d=google.com; s=arc-20160816; b=smu2lpBg9Kt2+/3fIqU96X7ij4lRFVaZqm03wVcxKMBW5IsFTbukAyBLpA/wpRGt2N i6zirgETZCOtmsRiXGhuPa+Ngi65RuRezUwdrUDpKR5XNip9S4jVQslIuVMTDYP8EBbt uXCxMm1q5KQcIzT4ho6FWCvJxWQ/OjUhNT7H7+q4YJLu/kBRxR0nOWnt5tF3RYZD55yV lDfqxay8huI4rTlQUc8E4MCCvEtezHO833iMT931JnVnobeZJ6Rh2Q4JS0ZDByqAGy1g pUC4lRzhomaec0zD+Xavp8L8oDahNYk00hxX386x+89ABEHibHj7kFD/CrYiWmRfd0Gs v9VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=AqLr77e+YiK8+HVwWmuG9SWDToMvkIOUFQNYa7obawA=; b=m1AgS8uCyytaNzOjM3a3vmT1aKGlnGlgJKqQCNfexgNEf5kcCbb2RdhpcSYMtC4gw+ oi6JbkiYYeaLWZDkERWN+eJP8INA6OdDzPBfPgFsqFc08k9hjqZdshByGVqtTyxZcyGi 4LTxX6J2iwTuibqPp1xikHpUshd1cB0wAMKCsDxLdpwfBb8BvHruGOhHQmWHYk8yaGuy NtJ2vJ9D/WlXdEwM7gII61jNbjfDdO0EUXFWc0a2q6cPljOmBKo2lMI7mtpXbon4yuVJ ueOM7ovmsYjg+wl7Wk4s4APTFH2sqSErk2UZVx2TPucDyNWakKtnKATjIcc4AcFx1syD 6gkg== 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 d16si3182424ejp.131.2020.06.05.02.46.38; Fri, 05 Jun 2020 02:47:01 -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 S1726434AbgFEJot (ORCPT + 99 others); Fri, 5 Jun 2020 05:44:49 -0400 Received: from mx.socionext.com ([202.248.49.38]:45698 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726277AbgFEJos (ORCPT ); Fri, 5 Jun 2020 05:44:48 -0400 Received: from unknown (HELO kinkan-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 05 Jun 2020 18:44:46 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by kinkan-ex.css.socionext.com (Postfix) with ESMTP id 462C618010B; Fri, 5 Jun 2020 18:44:46 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Fri, 5 Jun 2020 18:44:46 +0900 Received: from plum.e01.socionext.com (unknown [10.213.132.32]) by kinkan.css.socionext.com (Postfix) with ESMTP id 8CD7C1A12AD; Fri, 5 Jun 2020 18:44:45 +0900 (JST) From: Kunihiko Hayashi To: Bjorn Helgaas , Lorenzo Pieralisi , Jingoo Han , Gustavo Pimentel , Rob Herring , Masahiro Yamada , Marc Zyngier Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Masami Hiramatsu , Jassi Brar , Kunihiko Hayashi Subject: [PATCH v4 5/6] PCI: uniphier: Add error message when failed to get phy Date: Fri, 5 Jun 2020 18:44:35 +0900 Message-Id: <1591350276-15816-6-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591350276-15816-1-git-send-email-hayashi.kunihiko@socionext.com> References: <1591350276-15816-1-git-send-email-hayashi.kunihiko@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Even if phy driver doesn't probe, the error message can't be distinguished from other errors. This displays error message caused by the phy driver explicitly. Signed-off-by: Kunihiko Hayashi --- drivers/pci/controller/dwc/pcie-uniphier.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-uniphier.c b/drivers/pci/controller/dwc/pcie-uniphier.c index c37a968..8356dd3 100644 --- a/drivers/pci/controller/dwc/pcie-uniphier.c +++ b/drivers/pci/controller/dwc/pcie-uniphier.c @@ -470,8 +470,12 @@ static int uniphier_pcie_probe(struct platform_device *pdev) return PTR_ERR(priv->rst); priv->phy = devm_phy_optional_get(dev, "pcie-phy"); - if (IS_ERR(priv->phy)) - return PTR_ERR(priv->phy); + if (IS_ERR(priv->phy)) { + ret = PTR_ERR(priv->phy); + if (ret != -EPROBE_DEFER) + dev_err(dev, "Failed to get phy (%d)\n", ret); + return ret; + } platform_set_drvdata(pdev, priv); -- 2.7.4