Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755513AbaAYUY6 (ORCPT ); Sat, 25 Jan 2014 15:24:58 -0500 Received: from mail-oa0-f46.google.com ([209.85.219.46]:42937 "EHLO mail-oa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755486AbaAYUY4 (ORCPT ); Sat, 25 Jan 2014 15:24:56 -0500 MIME-Version: 1.0 In-Reply-To: References: <20140125150559.GN16455@hansolo.jdub.homelinux.org> Date: Sat, 25 Jan 2014 15:24:55 -0500 X-Google-Sender-Auth: FwHeTjrqXp-Y3KofvO-_4eALqiE Message-ID: Subject: Re: [PATCH] usb: phy: Quiet unable to find transceiver message From: Josh Boyer To: Alan Stern Cc: Felipe Balbi , Greg Kroah-Hartman , linux-usb@vger.kernel.org, "Linux-Kernel@Vger. Kernel. Org" , valentine.barshak@cogentembedded.com Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 25, 2014 at 10:37 AM, Alan Stern wrote: > On Sat, 25 Jan 2014, Josh Boyer wrote: > >> commit 1ae5799ef6317 ("usb: hcd: Initialize USB phy if needed") allows >> the USB layer to initialize external PHYs if needed. However, a PHY is >> not needed in all cases. The usb_get_phy_device function will print >> an error message, "unable to find transceiver" but everything still >> functions normally. >> >> Drop the severity of this message to pr_debug. >> >> Signed-off-by: Josh Boyer >> --- >> drivers/usb/phy/phy.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c >> index e6f61e4..c7fe880 100644 >> --- a/drivers/usb/phy/phy.c >> +++ b/drivers/usb/phy/phy.c >> @@ -228,7 +228,7 @@ struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index) >> >> phy = __usb_find_phy_dev(dev, &phy_bind_list, index); >> if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) { >> - pr_err("unable to find transceiver\n"); >> + pr_debug("unable to find transceiver\n"); >> goto err0; >> } > > Wouldn't it make more sense to change this to dev_debug? As it stands, > the user has no idea which device is lacking a transceiver. Quite possibly, yes. I'm not overly familiar with the subsystem and was just writing up what Felipe suggested. > (The same is probably true for other log messages in this source file.) I don't disagree, but I'd rather someone with more experience in the USB subsystem do that kind of broader audit/change. I'd be happy to test. josh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/