Message ID | 20230510075129.28047-1-stanley_chang@realtek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3441219vqo; Wed, 10 May 2023 00:59:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4hCFCy32OHse2GbA1j4P9FvHbuPZquDBe7vSpqdgJXdUH3l3dtaGMSI/Vr9jDGyM2b0NXZ X-Received: by 2002:a05:6a20:9192:b0:f2:cc6a:932 with SMTP id v18-20020a056a20919200b000f2cc6a0932mr20933076pzd.49.1683705558936; Wed, 10 May 2023 00:59:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683705558; cv=none; d=google.com; s=arc-20160816; b=p4TVnlclbn5dttAgnEliErmfkUG4+BgtgldK40rO1RCKN/wlq+U+KO05IxKh97KU5/ DeU5j1xGEb1TvQanN/SnRGtpPbRvsXX7vXBO0C0PxYsAwfWz3PEUcqR2XwJLASEkZ6Ap 0KE1tbO/14DQEj4tn9oBvgUU1l1JSyECJObOEo5kDrrXFCpt681tK+3O5JsgSq5Fpcyq QTxfUVWedqxJuRLzWTgWTGtU8gzZsZcQ94NcWXQV3jB4kXdVKuO4jPghFA0Gcf0rz8LO T6HwoNLZGYfaBND782/5i6u4s4cQ7m24u8dTPUdTjlfalYj0NO8nQQ9X/nXIPE924G6p O1QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:authenticated-by; bh=IJGgh8G3BuIEVCJg8I8WgXmf7MVgrSGhoZkqUwuSZUA=; b=kozqivuPDN9vzDFSOxMfOzJq53kmufgCACZGGPjXLB/zBgYI3HwNIFTzDlI/wXEyNI YdIp5rq0vfbEQis+nomkQH0sq4251dMPJUjYBRoiFXKDKRq75lC/vztVllQYrznSyMp9 n3MXDZima3CbNVyaSiXSVANdvpdpxbznsAZS5Q5mq9tlZuwTN5dyt15vvOGFb1DSEerv 7yFLcPHmIAd9sJA1X2aPVKMQ+yd0YBQz8zOSjRNFx7SxwlKDZvLJ1nTB4BtRbzCDhSfL d5i08BIT3k8qH8OvbFyiQ4YmTnXgnMcoyS/LhZKo6jgMOSm9LFYKFbfkj2xfEne3VUCf q9Lg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x24-20020a63db58000000b0052161765a25si3573832pgi.288.2023.05.10.00.59.04; Wed, 10 May 2023 00:59:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236315AbjEJHvn (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Wed, 10 May 2023 03:51:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236223AbjEJHvl (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 10 May 2023 03:51:41 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D447D116; Wed, 10 May 2023 00:51:38 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 34A7pNtM5009224, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 34A7pNtM5009224 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Wed, 10 May 2023 15:51:24 +0800 Received: from RTEXDAG02.realtek.com.tw (172.21.6.101) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Wed, 10 May 2023 15:51:30 +0800 Received: from RTEXH36505.realtek.com.tw (172.21.6.25) by RTEXDAG02.realtek.com.tw (172.21.6.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Wed, 10 May 2023 15:51:29 +0800 Received: from localhost.localdomain (172.21.252.101) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server id 15.1.2375.32 via Frontend Transport; Wed, 10 May 2023 15:51:29 +0800 From: Stanley Chang <stanley_chang@realtek.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> CC: Stanley Chang <stanley_chang@realtek.com>, Klaus Kudielka <klaus.kudielka@gmail.com>, Mathias Nyman <mathias.nyman@intel.com>, <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH v1] usb: xhci: plat: remove error log for failure to get usb-phy Date: Wed, 10 May 2023 15:51:29 +0800 Message-ID: <20230510075129.28047-1-stanley_chang@realtek.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-KSE-ServerInfo: RTEXDAG02.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765493239919284731?= X-GMAIL-MSGID: =?utf-8?q?1765493239919284731?= |
Series |
[v1] usb: xhci: plat: remove error log for failure to get usb-phy
|
|
Commit Message
Stanley Chang[昌育德]
May 10, 2023, 7:51 a.m. UTC
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(-)
Comments
On Wed, 2023-05-10 at 15:51 +0800, Stanley Chang wrote: > 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> Thanks, the false positives are now gone for those without CONFIG_USB_PHY. Tested-by: Klaus Kudielka <klaus.kudielka@gmail.com>
On Wed, May 10, 2023 at 03:51:29PM +0800, Stanley Chang wrote: > 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> This one fixes the annoying bogus error messages that started showing up in 6.4-rc on the Lenovo X13s and other machines not using the legacy PHY drivers: Fixes: 9134c1fd0503 ("usb: xhci: plat: Add USB 3.0 phy support") Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Tested-by: Johan Hovold <johan+linaro@kernel.org> Greg, I noticed you applied this one for 6.5; any chance we could get this fixed already in 6.4 which has the offending commit? > --- > 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); Johan
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);