From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Peter Rosin <peda@axentia.se>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-i2c <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH] i2c: synquacer: fix fence-post error in retry loop
Date: Mon, 14 May 2018 12:35:40 +0200 [thread overview]
Message-ID: <CAKv+Gu_ffVT2Ns5ta9jLLWf-ZdzO7+EZn+-6wpWHYx9--r5umw@mail.gmail.com> (raw)
In-Reply-To: <20180509194726.29166-1-peda@axentia.se>
On 9 May 2018 at 21:47, Peter Rosin <peda@axentia.se> wrote:
> There is a difference between attempts and retries.
>
> Signed-off-by: Peter Rosin <peda@axentia.se>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> drivers/i2c/busses/i2c-synquacer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-synquacer.c b/drivers/i2c/busses/i2c-synquacer.c
> index a021f866d8c2..915f5edbab33 100644
> --- a/drivers/i2c/busses/i2c-synquacer.c
> +++ b/drivers/i2c/busses/i2c-synquacer.c
> @@ -509,7 +509,7 @@ static int synquacer_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
>
> dev_dbg(i2c->dev, "calculated timeout %d ms\n", i2c->timeout_ms);
>
> - for (retry = 0; retry < adap->retries; retry++) {
> + for (retry = 0; retry <= adap->retries; retry++) {
> ret = synquacer_i2c_doxfer(i2c, msgs, num);
> if (ret != -EAGAIN)
> return ret;
> --
> 2.11.0
>
next prev parent reply other threads:[~2018-05-14 10:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-09 19:47 [PATCH] i2c: synquacer: fix fence-post error in retry loop Peter Rosin
2018-05-14 10:35 ` Ard Biesheuvel [this message]
2018-05-17 13:41 ` Wolfram Sang
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=CAKv+Gu_ffVT2Ns5ta9jLLWf-ZdzO7+EZn+-6wpWHYx9--r5umw@mail.gmail.com \
--to=ard.biesheuvel@linaro.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@axentia.se \
/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).