public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] usb: xhci: plat: remove error log for failure to get usb-phy
@ 2023-05-10  7:51 Stanley Chang
  2023-05-10 17:39 ` Klaus Kudielka
  2023-05-23 12:41 ` Johan Hovold
  0 siblings, 2 replies; 3+ messages in thread
From: Stanley Chang @ 2023-05-10  7:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Stanley Chang, Klaus Kudielka, Mathias Nyman, linux-usb,
	linux-kernel

Remove this log to avoid non-error conditions.
If CONFIG_USB_PHY is disabled, the following error message appears:
[    0.231609] xhci-hcd f10f0000.usb3: xhci_plat_probe get usb3phy fail (ret=-6)
[    0.239716] xhci-hcd f10f8000.usb3: xhci_plat_probe get usb3phy fail (ret=-6)
In this case, devm_usb_get_phy_by_phandle is declared static inline
and returns -ENXIO.

It is easy to pinpoint the failure to get the usb-phy using the debug
log in drivers/usb/phy/phy.c. Therefore, it can be removed.

Signed-off-by: Stanley Chang <stanley_chang@realtek.com>
---
 drivers/usb/host/xhci-plat.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index b0c8e8efc43b..6a45ee431945 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -294,10 +294,6 @@ int xhci_plat_probe(struct platform_device *pdev, struct device *sysdev, const s
 		xhci->shared_hcd->usb_phy = devm_usb_get_phy_by_phandle(sysdev,
 			    "usb-phy", 1);
 		if (IS_ERR(xhci->shared_hcd->usb_phy)) {
-			if (PTR_ERR(xhci->shared_hcd->usb_phy) != -ENODEV)
-				dev_err(sysdev, "%s get usb3phy fail (ret=%d)\n",
-					     __func__,
-					    (int)PTR_ERR(xhci->shared_hcd->usb_phy));
 			xhci->shared_hcd->usb_phy = NULL;
 		} else {
 			ret = usb_phy_init(xhci->shared_hcd->usb_phy);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-23 12:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-10  7:51 [PATCH v1] usb: xhci: plat: remove error log for failure to get usb-phy Stanley Chang
2023-05-10 17:39 ` Klaus Kudielka
2023-05-23 12:41 ` Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox