linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Johan Hovold <johan@kernel.org>,
	"Ji-Ze Hong (Peter Hong)" <hpeter@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] USB: serial: f81534: Detect errors from f81534_logic_to_phy_port()
Date: Mon, 2 Jan 2017 10:32:44 +0100	[thread overview]
Message-ID: <20170102093244.GL8189@localhost> (raw)
In-Reply-To: <20161219111115.GL21690@localhost>

On Mon, Dec 19, 2016 at 12:11:15PM +0100, Johan Hovold wrote:
> On Sun, Dec 18, 2016 at 10:19:28AM +0100, Geert Uytterhoeven wrote:
> > With gcc 4.1.2:
> > 
> >     drivers/usb/serial/f81534.c: In function ‘f81534_port_probe’:
> >     drivers/usb/serial/f81534.c:1250: warning: comparison is always false due to limited range of data type
> > 
> > f81534_logic_to_phy_port() may return a negative error value, which is
> > ignored by assigning it to u8 f81534_port_private.phy_num.
> > 
> > Use an intermediate variable of type int to fix this.
> > While at it, forward the actual error code instead of converting it to
> > -ENODEV, and drop the useless check for F81534_NUM_PORT, as the callee
> > always returns a valid port number in case of success.
> > 
> > Fixes: 0c9bd6004d258d46 ("USB: serial: add Fintek F81532/534 driver")
> > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > ---
> > v2:
> >   - Drop useless check for F81534_NUM_PORT.
> 
> Thanks for the update. I'll queue this one up for -rc2.

Now applied, thanks.

Johan

      reply	other threads:[~2017-01-02  9:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-18  9:19 [PATCH v2] USB: serial: f81534: Detect errors from f81534_logic_to_phy_port() Geert Uytterhoeven
2016-12-19 11:11 ` Johan Hovold
2017-01-02  9:32   ` 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=20170102093244.GL8189@localhost \
    --to=johan@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpeter@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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 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).