All of lore.kernel.org
 help / color / mirror / Atom feed
From: johan@kernel.org (Johan Hovold)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 8/9] usb: serial: mxuport: Simplify return statement
Date: Mon, 17 Aug 2015 13:16:25 +0200	[thread overview]
Message-ID: <20150817111625.GE7053@localhost> (raw)
In-Reply-To: <05a5da593419a88886b1e75a0135d7b051b4bb76.1438695318.git.skarajga@visteon.com>

On Tue, Aug 04, 2015 at 02:04:35PM +0000, Karajgaonkar, Saurabh (S.) wrote:
> From: Saurabh Karajgaonkar <skarajga@visteon.com>
> 
> Replace redundant variable use in return statement.
> 
> Signed-off-by: Saurabh Karajgaonkar <skarajga@visteon.com>
> ---
>  drivers/usb/serial/mxuport.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/usb/serial/mxuport.c b/drivers/usb/serial/mxuport.c
> index 460a406..31a8b47 100644
> --- a/drivers/usb/serial/mxuport.c
> +++ b/drivers/usb/serial/mxuport.c
> @@ -1137,13 +1137,9 @@ static int mxuport_port_probe(struct usb_serial_port *port)
>  		return err;
>  
>  	/* Set interface (RS-232) */
> -	err = mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_INTERFACE,
> -				    MX_INT_RS232,
> -				    port->port_number);
> -	if (err)
> -		return err;
> -
> -	return 0;
> +	return mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_INTERFACE,
> +				     MX_INT_RS232,
> +				     port->port_number);

I do not consider this an improvement as it makes the final ctrl-request
call look different from the previous two without any real benefit.

I'll drop this one.

Johan

WARNING: multiple messages have this Message-ID (diff)
From: Johan Hovold <johan@kernel.org>
To: "Karajgaonkar, Saurabh (S.)" <skarajga@visteon.com>
Cc: "srinivas.kandagatla@gmail.com" <srinivas.kandagatla@gmail.com>,
	"maxime.coquelin@st.com" <maxime.coquelin@st.com>,
	"patrice.chotard@st.com" <patrice.chotard@st.com>,
	"stern@rowland.harvard.edu" <stern@rowland.harvard.edu>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"mathias.nyman@intel.com" <mathias.nyman@intel.com>,
	"balbi@ti.com" <balbi@ti.com>,
	"johan@kernel.org" <johan@kernel.org>,
	"sergei.shtylyov@cogentembedded.com" 
	<sergei.shtylyov@cogentembedded.com>,
	"Julia.Lawall@lip6.fr" <Julia.Lawall@lip6.fr>,
	"khilman@linaro.org" <khilman@linaro.org>,
	"rafael.j.wysocki@intel.com" <rafael.j.wysocki@intel.com>,
	"pmladek@suse.cz" <pmladek@suse.cz>,
	"wsa@the-dreams.de" <wsa@the-dreams.de>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"kernel@stlinux.com" <kernel@stlinux.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 8/9] usb: serial: mxuport: Simplify return statement
Date: Mon, 17 Aug 2015 13:16:25 +0200	[thread overview]
Message-ID: <20150817111625.GE7053@localhost> (raw)
In-Reply-To: <05a5da593419a88886b1e75a0135d7b051b4bb76.1438695318.git.skarajga@visteon.com>

On Tue, Aug 04, 2015 at 02:04:35PM +0000, Karajgaonkar, Saurabh (S.) wrote:
> From: Saurabh Karajgaonkar <skarajga@visteon.com>
> 
> Replace redundant variable use in return statement.
> 
> Signed-off-by: Saurabh Karajgaonkar <skarajga@visteon.com>
> ---
>  drivers/usb/serial/mxuport.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/usb/serial/mxuport.c b/drivers/usb/serial/mxuport.c
> index 460a406..31a8b47 100644
> --- a/drivers/usb/serial/mxuport.c
> +++ b/drivers/usb/serial/mxuport.c
> @@ -1137,13 +1137,9 @@ static int mxuport_port_probe(struct usb_serial_port *port)
>  		return err;
>  
>  	/* Set interface (RS-232) */
> -	err = mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_INTERFACE,
> -				    MX_INT_RS232,
> -				    port->port_number);
> -	if (err)
> -		return err;
> -
> -	return 0;
> +	return mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_INTERFACE,
> +				     MX_INT_RS232,
> +				     port->port_number);

I do not consider this an improvement as it makes the final ctrl-request
call look different from the previous two without any real benefit.

I'll drop this one.

Johan

  reply	other threads:[~2015-08-17 11:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-04 14:01 [PATCH v2 0/9] usb: Simplify return statements Karajgaonkar, Saurabh (S.)
2015-08-04 14:01 ` Karajgaonkar, Saurabh (S.)
2015-08-04 14:01 ` [PATCH v2 1/9] usb: phy: phy-mxs-usb: Simplify return statement Karajgaonkar, Saurabh (S.)
2015-08-04 14:01   ` Karajgaonkar, Saurabh (S.)
2015-08-04 14:02 ` [PATCH v2 2/9] usb: phy: phy-keystone: " Karajgaonkar, Saurabh (S.)
2015-08-04 14:02   ` Karajgaonkar, Saurabh (S.)
2015-08-04 14:02 ` [PATCH v2 3/9] usb: musb: musb_dsps: " Karajgaonkar, Saurabh (S.)
2015-08-04 14:02   ` Karajgaonkar, Saurabh (S.)
2015-08-04 14:02 ` [PATCH v2 4/9] usb: host: ehci-st: " Karajgaonkar, Saurabh (S.)
2015-08-04 14:02   ` Karajgaonkar, Saurabh (S.)
2015-08-10  7:44   ` Maxime Coquelin
2015-08-10  7:44     ` Maxime Coquelin
2015-08-04 14:03 ` [PATCH v2 5/9] usb: host: oxu210hp-hcd: " Karajgaonkar, Saurabh (S.)
2015-08-04 14:03   ` Karajgaonkar, Saurabh (S.)
2015-08-04 14:03 ` [PATCH v2 6/9] usb: host: u132-hcd: " Karajgaonkar, Saurabh (S.)
2015-08-04 14:03   ` Karajgaonkar, Saurabh (S.)
2015-08-04 14:04 ` [PATCH v2 7/9] usb: host: xhci: " Karajgaonkar, Saurabh (S.)
2015-08-04 14:04   ` Karajgaonkar, Saurabh (S.)
2015-08-04 14:04 ` [PATCH v2 8/9] usb: serial: mxuport: " Karajgaonkar, Saurabh (S.)
2015-08-04 14:04   ` Karajgaonkar, Saurabh (S.)
2015-08-17 11:16   ` Johan Hovold [this message]
2015-08-17 11:16     ` Johan Hovold
2015-08-04 14:05 ` [PATCH v2 9/9] usb: misc: ftdi-elan: " Karajgaonkar, Saurabh (S.)
2015-08-04 14:05   ` Karajgaonkar, Saurabh (S.)

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=20150817111625.GE7053@localhost \
    --to=johan@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.