linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Konstantin Shkolnyy <Konstantin.Shkolnyy@silabs.com>
Cc: Martyn Welch <martyn.welch@collabora.co.uk>,
	Konstantin Shkolnyy <konstantin.shkolnyy@gmail.com>,
	"johan@kernel.org" <johan@kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@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.
Date: Mon, 18 Jan 2016 18:42:36 +0100	[thread overview]
Message-ID: <20160118174236.GG3169@localhost> (raw)
In-Reply-To: <BLUPR0701MB1572B0FC50ED940FC6ED559891CC0@BLUPR0701MB1572.namprd07.prod.outlook.com>

On Thu, Jan 14, 2016 at 06:22:29PM +0000, Konstantin Shkolnyy wrote:
> > -----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;

Why rename the return value? I prefer ret over err, but there's no need
to change such things for code that's already in place.

> > >
> > > -	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.

Yes, but it's an unrelated change. The previous error message was more
informative.

Thanks,
Johan

      parent reply	other threads:[~2016-01-18 17:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-02  3:12 [PATCH v3 2/4] USB: serial: cp210x: Switch to new 16-bit register access functions Konstantin Shkolnyy
2016-01-14 17:43 ` Martyn Welch
2016-01-14 18:22   ` Konstantin Shkolnyy
2016-01-14 18:23     ` Martyn Welch
2016-01-18 17:42     ` Johan Hovold [this message]

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=20160118174236.GG3169@localhost \
    --to=johan@kernel.org \
    --cc=Konstantin.Shkolnyy@silabs.com \
    --cc=konstantin.shkolnyy@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=martyn.welch@collabora.co.uk \
    /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;
as well as URLs for NNTP newsgroup(s).