Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1309565

RE: [PATCH v3 2/4] USB: serial: cp210x: Switch to new 16-bit register access functions.

From Konstantin Shkolnyy <Konstantin.Shkolnyy@silabs.com>
Newsgroups linux.kernel
Subject RE: [PATCH v3 2/4] USB: serial: cp210x: Switch to new 16-bit register access functions.
Date 2016-01-14 19:40 +0100
Message-ID <qQUOK-2sE-5@gated-at.bofh.it> (permalink)
References <qMkTw-2KQ-9@gated-at.bofh.it> <qQUc3-1S2-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> -----Original Message-----
> From: linux-usb-owner@vger.kernel.org [mailto:linux-usb-
> owner@vger.kernel.org] On Behalf Of Martyn Welch
> Sent: Thursday, January 14, 2016 11:44
> To: Konstantin Shkolnyy; johan@kernel.org
> Cc: linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v3 2/4] USB: serial: cp210x: Switch to new 16-bit register
> access functions.
...

> > @@ -697,14 +685,11 @@ static unsigned int
> cp210x_quantise_baudrate(unsigned int baud)
> >
> >   static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *port)
> >   {
> > -	int result;
> > +	int err;
> >
> > -	result = cp210x_set_config_single(port, CP210X_IFC_ENABLE,
> > -
> 	UART_ENABLE);
> > -	if (result) {
> > -		dev_err(&port->dev, "%s - Unable to enable UART\n",
> __func__);
> > -		return result;
> > -	}
> > +	err = cp210x_write_u16_reg(port, CP210X_IFC_ENABLE,
> UART_ENABLE);
> > +	if (err)
> > +		return err;
> 
> Any reason for dropping the error message?

I already print a message if the underlying usb_control_msg fails, so it should be covered there.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 2/4] USB: serial: cp210x: Switch to new 16-bit register access functions. Konstantin Shkolnyy <konstantin.shkolnyy@gmail.com> - 2016-01-02 04:20 +0100
  Re: [PATCH v3 2/4] USB: serial: cp210x: Switch to new 16-bit register  access functions. Martyn Welch <martyn.welch@collabora.co.uk> - 2016-01-14 18:50 +0100
    Re: [PATCH v3 2/4] USB: serial: cp210x: Switch to new 16-bit register  access functions. Martyn Welch <martyn.welch@collabora.co.uk> - 2016-01-14 19:30 +0100
    RE: [PATCH v3 2/4] USB: serial: cp210x: Switch to new 16-bit register  access functions. Konstantin Shkolnyy <Konstantin.Shkolnyy@silabs.com> - 2016-01-14 19:40 +0100
      Re: [PATCH v3 2/4] USB: serial: cp210x: Switch to new 16-bit  register access functions. Johan Hovold <johan@kernel.org> - 2016-01-18 18:50 +0100

csiph-web