All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
To: Bernhard Walle <walle-pDveNdigDaDu9UdzE1sIFA@public.gmane.org>
Cc: khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org,
	rade.bozic.ext-OYasijW0DpE@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] MIPS: I2C: Return -ETIMEDOUT in octeon_i2c_wait() on timeout
Date: Mon, 27 Sep 2010 10:32:06 -0700	[thread overview]
Message-ID: <4CA0D516.9060404@caviumnetworks.com> (raw)
In-Reply-To: <1285584916-21317-1-git-send-email-walle-pDveNdigDaDu9UdzE1sIFA@public.gmane.org>

On 09/27/2010 03:55 AM, Bernhard Walle wrote:
> It doesn't make sense to set result to -ETIMEDOUT but return 0 (success)
> afterwards. Since there's code in octeon_i2c_start() to handle the
> error, it should be called.
>
> Signed-off-by: Bernhard Walle<walle-pDveNdigDaDu9UdzE1sIFA@public.gmane.org>

Thanks for fixing this.

Acked-by: David Daney <ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>


> ---
>   drivers/i2c/busses/i2c-octeon.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-octeon.c b/drivers/i2c/busses/i2c-octeon.c
> index 0e9f85d..56dbe54 100644
> --- a/drivers/i2c/busses/i2c-octeon.c
> +++ b/drivers/i2c/busses/i2c-octeon.c
> @@ -218,7 +218,7 @@ static int octeon_i2c_wait(struct octeon_i2c *i2c)
>   		return result;
>   	} else if (result == 0) {
>   		dev_dbg(i2c->dev, "%s: timeout\n", __func__);
> -		result = -ETIMEDOUT;
> +		return -ETIMEDOUT;
>   	}
>
>   	return 0;

WARNING: multiple messages have this Message-ID (diff)
From: David Daney <ddaney@caviumnetworks.com>
To: Bernhard Walle <walle@corscience.de>
Cc: khali@linux-fr.org, rade.bozic.ext@nsn.com,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS: I2C: Return -ETIMEDOUT in octeon_i2c_wait() on timeout
Date: Mon, 27 Sep 2010 10:32:06 -0700	[thread overview]
Message-ID: <4CA0D516.9060404@caviumnetworks.com> (raw)
In-Reply-To: <1285584916-21317-1-git-send-email-walle@corscience.de>

On 09/27/2010 03:55 AM, Bernhard Walle wrote:
> It doesn't make sense to set result to -ETIMEDOUT but return 0 (success)
> afterwards. Since there's code in octeon_i2c_start() to handle the
> error, it should be called.
>
> Signed-off-by: Bernhard Walle<walle@corscience.de>

Thanks for fixing this.

Acked-by: David Daney <ddaney@caviumnetworks.com>


> ---
>   drivers/i2c/busses/i2c-octeon.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-octeon.c b/drivers/i2c/busses/i2c-octeon.c
> index 0e9f85d..56dbe54 100644
> --- a/drivers/i2c/busses/i2c-octeon.c
> +++ b/drivers/i2c/busses/i2c-octeon.c
> @@ -218,7 +218,7 @@ static int octeon_i2c_wait(struct octeon_i2c *i2c)
>   		return result;
>   	} else if (result == 0) {
>   		dev_dbg(i2c->dev, "%s: timeout\n", __func__);
> -		result = -ETIMEDOUT;
> +		return -ETIMEDOUT;
>   	}
>
>   	return 0;


  parent reply	other threads:[~2010-09-27 17:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-27 10:55 [PATCH] MIPS: I2C: Return -ETIMEDOUT in octeon_i2c_wait() on timeout Bernhard Walle
2010-09-27 10:55 ` Bernhard Walle
     [not found] ` <1285584916-21317-1-git-send-email-walle-pDveNdigDaDu9UdzE1sIFA@public.gmane.org>
2010-09-27 11:02   ` Wolfram Sang
2010-09-27 11:02     ` Wolfram Sang
2010-09-27 17:32   ` David Daney [this message]
2010-09-27 17:32     ` David Daney
     [not found]     ` <4CA0D516.9060404-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
2010-09-27 22:12       ` Ben Dooks
2010-09-27 22:12         ` Ben Dooks

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=4CA0D516.9060404@caviumnetworks.com \
    --to=ddaney-m3mlkvoiwjvv6pq1l3v1odbpr1lh4cv8@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rade.bozic.ext-OYasijW0DpE@public.gmane.org \
    --cc=walle-pDveNdigDaDu9UdzE1sIFA@public.gmane.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.