Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp19540767ybl; Sat, 4 Jan 2020 03:47:02 -0800 (PST) X-Google-Smtp-Source: APXvYqxEyVkqtSlNqAtpRKd/Nlq2qmbmFdXR2DPu4fcUCDZmF/dsZ2tfuBqlZDIl999rGFrMQ6QL X-Received: by 2002:a05:6830:1047:: with SMTP id b7mr107494331otp.77.1578138422804; Sat, 04 Jan 2020 03:47:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578138422; cv=none; d=google.com; s=arc-20160816; b=MtKg0V3XO3/kuUw5jIRGCq+/Z51MD8JZFUb/48TjW9sOJVXjjKZ2gqc3m2LqIcKtuI LOL8yGjB7zZ/8xS7w5wqj57fegl04psMJZpqn9CVgzP9kHqnGRrOD2a61MdsXrZ8SIE9 fT5TQVn9Rw1cNgz0r7OgbBcXWvrnrRPS6ZS8O+oFBHb2VgcP8ZpDNeu0dYQz9UJerR20 lf0SdY90WHAvcG4aNGG7zf4ZdcScuBKUd1ydzJ25Vh/zAq3EnJ8wbUUpTK4XAXwqYRaR 8Phn2wXd5Ynp6JbwJsAxgw+M4slCWIGQ9Tqz4RRjJOO+QmwPgLG47ej/y79bymQU+gMT mydw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=xXVT+CJ+oVClMzLKr1t8+ZJebHHdFBH4An2OsVtmVnU=; b=1GCXc7o/yQb3XpJDuRP5KGhO+eAeyjyAuwC9MJDgzdfJyi39MoqHVlgR/fER/qKlY3 ZBCiWgH1ZrZpwH1gVqNTRPdWayyhaGTja8XcxJRLx7FPPgeBoSfN0juKUQcldKfGIDhM yVoBMSsAfIIXgH71vGj68SvanF1whCyfQyOhm8l5Q2FOXSK3TbT7q2f5w6g3DsM6dB5S 26hkeSBOWkAvtxI4F/mwVfxVZXOrEAxrqO1F/7XOGNI8J4kiQL160sqficqt7wIEl4L9 NOcXwq5PzeovkWvVFATEmuNlwgXQAfSF0mKhJG2X7Z72ZEpSyKDWE3MJporZyMgFBRjH oZBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Vs9xTaCk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l17si23083706oie.41.2020.01.04.03.46.48; Sat, 04 Jan 2020 03:47:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Vs9xTaCk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725877AbgADLpe (ORCPT + 99 others); Sat, 4 Jan 2020 06:45:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:37844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725796AbgADLpd (ORCPT ); Sat, 4 Jan 2020 06:45:33 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CE082215A4; Sat, 4 Jan 2020 11:45:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578138333; bh=3yQtApWHrxtkiAUMD6R/mOeW0KEC9vC8PtzXH+HA9Lc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Vs9xTaCkVezxEDGeWNYdZ7JlAs/Aq9gMn8yQtDCacoRHTu0atxqmjh/YS73qNMNmD yzYkv3a5g9EIA8aHXAv3iJ9jJQh4LqE4AYdxW90TvIGx1W63iSBGL4vpMAfY2eiKq7 t/7xMJxRezumAe6g11AYrOx5hPH0dLAWMyLsl5As= Date: Sat, 4 Jan 2020 12:45:30 +0100 From: Greg KH To: Dejin Zheng Cc: balbi@kernel.org, stern@rowland.harvard.edu, rogerq@ti.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: gadget: udc: core: Warn about failed to find udc Message-ID: <20200104114530.GA1288021@kroah.com> References: <20200104112836.28036-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200104112836.28036-1-zhengdejin5@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 04, 2020 at 07:28:36PM +0800, Dejin Zheng wrote: > If we do not warn here, the user may not know failed to > find udc class driver because it silently fails. > Let's print a warning in that case so developers find > these problems faster. > > Signed-off-by: Dejin Zheng > --- > drivers/usb/gadget/udc/core.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c > index 51fa614b4079..9b11046480fe 100644 > --- a/drivers/usb/gadget/udc/core.c > +++ b/drivers/usb/gadget/udc/core.c > @@ -1414,6 +1414,8 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver) > } > > mutex_unlock(&udc_lock); > + if (ret) > + pr_warn("udc-core: couldn't find an available UDC or it's busy\n"); > return ret; > found: > ret = udc_bind_to_driver(udc, driver); > -- > 2.17.1 > Isn't this going to cause a lot more messages than is really needed? And as you have a device, shouldn't this be dev_warn()? thanks, greg k-h