Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp260024pxf; Thu, 25 Mar 2021 03:32:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+oiijHG0R1Y1hB0tKlbnScNbY4UoiUd1fXvcJw6HBsZTZv1dcq5o5wGFwvTvc+GFTrgsV X-Received: by 2002:a17:906:5607:: with SMTP id f7mr8395547ejq.262.1616668370420; Thu, 25 Mar 2021 03:32:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616668370; cv=none; d=google.com; s=arc-20160816; b=El8XIiOF/TPPHzRxQ74CKh4MbjUTcvz9/CakrsWtl4nrGINPIID6XH775d8ioWen6x de+XOOPqI44LmykX9eB2U0irSY78KvzFmTLHdBOIWN9w9OoRQH6FK1WqU1cIJG1Ey0vU RZEhosNAXVgrpaI6Pi10bbNVtrRaWUWnuV9B58Ud3YC+BcvBEMkSVk2f/3C3ms2aIgWW wDwZjUOiF02C1s+rYAKtt6OEyMb7gWW+qP3MJWNR9eN4gW5ykeGWrHq0hcga1bUSO/rU eCcv/ZeN1+/Uu1354IDAAm6mrf0Qw1dqdigoQIZoPED89vaiUwtJNJ0Y5O8DWR0j+IY/ SnWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gbRykBdKKYdTNhJRY2YY1l8m6bTCFKz6jwnTvh1ObtI=; b=pAdya+B8R8r3xFfosz7V/6q+h9BI8OFngH6oi5Hw84rhiP3fX3sVHi8R+fqaFPLiPs mT2vCd77ZQO5Eb+9VjlRBaUi/IsbHd2SMEUgbr5IwnVVUtAqltNZyDiQi9zAc8xYBlLD kniCp8uq1jy3lNP/V2L/Qz35QMKpC1VmMJFFU1XGIOuUKeerIcATuQGLlTgIxQPX3Qqg zC4k9UgCupQymWdhB9uDRxejXMMxoDSz1aVuG3EhhdKA5/bVZ+7IDfMxMmeL0B+kmnm5 vAT7cr6UUjG6ZGALE+L7dqz4Tdz9JmkuBiMfPp253AlCINEyd/oZLJ8g6qOWQdiv35T9 xoVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rhDtUeKu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay5si3834191ejb.692.2021.03.25.03.32.27; Thu, 25 Mar 2021 03:32:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rhDtUeKu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230155AbhCYKbM (ORCPT + 99 others); Thu, 25 Mar 2021 06:31:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:51746 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229979AbhCYKbI (ORCPT ); Thu, 25 Mar 2021 06:31:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0EE6461A25; Thu, 25 Mar 2021 10:31:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616668267; bh=gihgNnx2OUFDA8cjhLJ9cJkh6zClKQLfuJWEfLdUYMY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rhDtUeKuorG9Z1Aqfk67Anx8LUrD20TGZYX5SrOXXdeMR8anZd3IVoZe/qN9GBmUg 2cO5nBUqEntSGpHv62aDFIG/jnQESXgEtkFvEFDo5gLKlS7K2belTEb/rgRv5EgLmJ WG2ED2JcENSmWW9Vn3HyAMpGFjWk9wo/phjXBMA8= Date: Thu, 25 Mar 2021 11:31:04 +0100 From: Greg KH To: Longfang Liu Cc: mathias.nyman@intel.com, stern@rowland.harvard.edu, linux-usb@vger.kernel.org, yisen.zhuang@huawei.com, tanxiaofei@huawei.com, liudongdong3@huawei.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] USB:XHCI:Adjust the log level of hub Message-ID: References: <1616666652-37920-1-git-send-email-liulongfang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1616666652-37920-1-git-send-email-liulongfang@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 25, 2021 at 06:04:12PM +0800, Longfang Liu wrote: > When the number of ports of the hub is not between 1 and Maxports, > it will only exit the registration of the hub on the current controller, > but it will not affect the function of the controller itself. Its other > hubs can operate normally, so the log level here can be changed from > error to information. > > Signed-off-by: Longfang Liu > --- > drivers/usb/core/hub.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c > index b1e14be..70294ad 100644 > --- a/drivers/usb/core/hub.c > +++ b/drivers/usb/core/hub.c > @@ -1409,13 +1409,11 @@ static int hub_configure(struct usb_hub *hub, > maxchild = min_t(unsigned, maxchild, USB_SS_MAXPORTS); > > if (hub->descriptor->bNbrPorts > maxchild) { > - message = "hub has too many ports!"; > - ret = -ENODEV; > - goto fail; > + dev_info(hub_dev, "hub has too many ports!\n"); Is this an error? If so, report it as such, not as "information". > + return -ENODEV; > } else if (hub->descriptor->bNbrPorts == 0) { > - message = "hub doesn't have any ports!"; > - ret = -ENODEV; > - goto fail; > + dev_info(hub_dev, "hub doesn't have any ports!\n"); Same here. What problem are you trying to solve here? What hub do you have that has no ports, or too many, that you think should still be able to work properly? thanks, greg k-h