From patchwork Mon Jan 27 15:27:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 23749 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1994120300 for ; Mon, 27 Jan 2014 15:29:39 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id e9sf11697027qcy.7 for ; Mon, 27 Jan 2014 07:29:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=PLpxrOnXyGLrYfzxX0jQTmc8FbabJS52DCQVUenFUQU=; b=gS2QxnQdsD8boSyHj3BbHrQzbaJITM62DdKi5e215CrwVfu9lhjEJU+g3OVTbl5WjS /30Q+4/doKbZtvdHOdKcE7k/r0LJ3a+m9ctPKBXAxdr0mZrxy9Mrou4aun/c8DxiEkXz OZjbH5NdxhetcIR7qwBLQNUGz0txzRR42/5IW8raml5R+kBYy/L6RMObD0z6p91vH/eY z5Al32xhLJH8rUO8S161uBooH+J4xDpjOIGYg2PSDLWcCnn1Q88CSLjCEElaOhFOoLlA 5Ury14sSg01eO1P+WPeSDhexwtp8E8luTiUAQJNSC5J5cbiCxdUK6/8Dnp8mUlsYf9AH knmA== X-Gm-Message-State: ALoCoQm6RHQIIhrtQTpAc8J+fmvY2OvSKU3asR40h8mYMvlR+pC6rWviuawR0iuN2PeTBlaVya8m X-Received: by 10.58.170.6 with SMTP id ai6mr11128065vec.7.1390836578316; Mon, 27 Jan 2014 07:29:38 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.71 with SMTP id c65ls1656988qge.4.gmail; Mon, 27 Jan 2014 07:29:38 -0800 (PST) X-Received: by 10.221.66.73 with SMTP id xp9mr513200vcb.27.1390836578228; Mon, 27 Jan 2014 07:29:38 -0800 (PST) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by mx.google.com with ESMTPS id go5si5198212vec.71.2014.01.27.07.29.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Jan 2014 07:29:38 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.43; Received: by mail-vb0-f43.google.com with SMTP id p5so3436500vbn.2 for ; Mon, 27 Jan 2014 07:29:38 -0800 (PST) X-Received: by 10.52.227.193 with SMTP id sc1mr3536504vdc.1.1390836578094; Mon, 27 Jan 2014 07:29:38 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp137113vcz; Mon, 27 Jan 2014 07:29:37 -0800 (PST) X-Received: by 10.68.248.100 with SMTP id yl4mr30651660pbc.41.1390836558362; Mon, 27 Jan 2014 07:29:18 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tq3si11876514pab.67.2014.01.27.07.29.13; Mon, 27 Jan 2014 07:29:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753814AbaA0P3I (ORCPT + 3 others); Mon, 27 Jan 2014 10:29:08 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:43167 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753539AbaA0P3H (ORCPT ); Mon, 27 Jan 2014 10:29:07 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s0RFT1Wo001747; Mon, 27 Jan 2014 09:29:01 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s0RFT1qC011168; Mon, 27 Jan 2014 09:29:01 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.2.342.3; Mon, 27 Jan 2014 09:29:01 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s0RFT0hK021639; Mon, 27 Jan 2014 09:29:01 -0600 From: Felipe Balbi To: Greg KH CC: , Linux USB Mailing List , Felipe Balbi Subject: [PATCH] usb: phy: move some error messages to debug Date: Mon, 27 Jan 2014 09:27:46 -0600 Message-ID: <1390836466-16007-1-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.8.5.2 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , the PHY layer is supposed to be optional, considering some PHY have no control bus for SW to poke around. After commit 1ae5799 (usb: hcd: Initialize USB phy if needed) any HCD which didn't provide a PHY driver would emit annoying error messages. In this patch we're decreasing those messages to debugging only and we also add a PHY prefix so we know where they're coming from. Reported-by: Josh Boyer Signed-off-by: Felipe Balbi --- drivers/usb/phy/phy.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c index e6f61e4..29840c2 100644 --- a/drivers/usb/phy/phy.c +++ b/drivers/usb/phy/phy.c @@ -130,7 +130,7 @@ struct usb_phy *usb_get_phy(enum usb_phy_type type) phy = __usb_find_phy(&phy_list, type); if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) { - pr_err("unable to find transceiver of type %s\n", + pr_debug("PHY: unable to find transceiver of type %s\n", usb_phy_type_string(type)); goto err0; } @@ -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("PHY: unable to find transceiver\n"); goto err0; } @@ -424,10 +424,8 @@ int usb_bind_phy(const char *dev_name, u8 index, unsigned long flags; phy_bind = kzalloc(sizeof(*phy_bind), GFP_KERNEL); - if (!phy_bind) { - pr_err("phy_bind(): No memory for phy_bind"); + if (!phy_bind) return -ENOMEM; - } phy_bind->dev_name = dev_name; phy_bind->phy_dev_name = phy_dev_name;