From: Greg KH <gregkh@linuxfoundation.org>
To: Longfang Liu <liulongfang@huawei.com>
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
Date: Thu, 25 Mar 2021 11:31:04 +0100 [thread overview]
Message-ID: <YFxmaEtKclXXpBfy@kroah.com> (raw)
In-Reply-To: <1616666652-37920-1-git-send-email-liulongfang@huawei.com>
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 <liulongfang@huawei.com>
> ---
> 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
next prev parent reply other threads:[~2021-03-25 10:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-25 10:04 [RFC PATCH] USB:XHCI:Adjust the log level of hub Longfang Liu
2021-03-25 10:31 ` Greg KH [this message]
2021-03-25 13:33 ` liulongfang
2021-03-25 13:59 ` Greg KH
2021-03-25 14:31 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YFxmaEtKclXXpBfy@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=liudongdong3@huawei.com \
--cc=liulongfang@huawei.com \
--cc=mathias.nyman@intel.com \
--cc=stern@rowland.harvard.edu \
--cc=tanxiaofei@huawei.com \
--cc=yisen.zhuang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox