lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200104114530.GA1288021@kroah.com>
Date:   Sat, 4 Jan 2020 12:45:30 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Dejin Zheng <zhengdejin5@...il.com>
Cc:     balbi@...nel.org, stern@...land.harvard.edu, rogerq@...com,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: gadget: udc: core: Warn about failed to find udc

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 <zhengdejin5@...il.com>
> ---
>  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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ