Re: [PATCH 2/3] USB: serial: use dev_err_console in generic write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 09, 2012 at 08:44:51AM -0800, Greg Kroah-Hartman wrote:
> On Mon, Feb 06, 2012 at 10:49:07AM +0100, Johan Hovold wrote:
> > Use dev_err_console in write path so that an error at least gets
> > reported once.
> > 
> > Reported-by: Stephen Hemminger <shemminger@xxxxxxxxxx>
> > Signed-off-by: Johan Hovold <jhovold@xxxxxxxxx>
> > ---
> >  drivers/usb/serial/generic.c |    4 +---
> >  1 files changed, 1 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
> > index e129fcd..2a2fa2d 100644
> > --- a/drivers/usb/serial/generic.c
> > +++ b/drivers/usb/serial/generic.c
> > @@ -217,10 +217,8 @@ retry:
> >  	clear_bit(i, &port->write_urbs_free);
> >  	result = usb_submit_urb(urb, GFP_ATOMIC);
> >  	if (result) {
> > -		if (!port->port.console) {
> > -			dev_err(&port->dev, "%s - error submitting urb: %d\n",
> > +		dev_err_console(port, "%s - error submitting urb: %d\n",
> 
> This was on top of Stephen's patch, which I didn't apply, so I just
> edited it to do what you wanted it to.

Not on top of Stephen's patch, but on top of the one I submitted ("USB:
serial: fix console error reporting") and which could be back-ported
more easily. I mentioned this in the first mail in the series.

If you apply this one first, there will be no warning (and no need for
hand editing).

(If you skip the first patch, then you must make sure that the first
argument to dev_err_console is "port" rather than "&port->dev").

Thanks,
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux