netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Charles (Chas) Williams" <3chas3@gmail.com>
To: LABBE Corentin <clabbe.montjoie@gmail.com>
Cc: linux-atm-general@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH v3 1/1] atm: solos-pci: Replace simple_strtol by kstrtoint
Date: Thu, 03 Dec 2015 06:26:31 -0500	[thread overview]
Message-ID: <1449141991.2645.67.camel@gmail.com> (raw)
In-Reply-To: <1449129968-22249-2-git-send-email-clabbe.montjoie@gmail.com>

On Thu, 2015-12-03 at 09:06 +0100, LABBE Corentin wrote:
> @@ -357,11 +357,11 @@ static int process_status(struct solos_card *card, int port, struct sk_buff *skb
>  	if (!str)
>  		return -EIO;
>  
> -	ver = simple_strtol(str, NULL, 10);
> -	if (ver < 1) {
> +	err = kstrtoint(str, 10, &ver);
> +	if (err || ver < 1) {
>  		dev_warn(&card->dev->dev, "Unexpected status interrupt version %d\n",
>  			 ver);
> -		return -EIO;
> +		return err;


If ver < 1 then you might return a 0 here.  Always returning -EIO is
probably just fine.

  reply	other threads:[~2015-12-03 11:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03  8:06 [PATCH v3 0/1] atm: solos-pci: Replace simple_strtol by kstrtoint LABBE Corentin
2015-12-03  8:06 ` [PATCH v3 1/1] " LABBE Corentin
2015-12-03 11:26   ` Charles (Chas) Williams [this message]
2015-12-03 12:58     ` LABBE Corentin
2015-12-03 16:34       ` Charles (Chas) Williams

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=1449141991.2645.67.camel@gmail.com \
    --to=3chas3@gmail.com \
    --cc=clabbe.montjoie@gmail.com \
    --cc=linux-atm-general@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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).