lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKv+Gu_ffVT2Ns5ta9jLLWf-ZdzO7+EZn+-6wpWHYx9--r5umw@mail.gmail.com>
Date:   Mon, 14 May 2018 12:35:40 +0200
From:   Ard Biesheuvel <ard.biesheuvel@...aro.org>
To:     Peter Rosin <peda@...ntia.se>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-i2c <linux-i2c@...r.kernel.org>
Subject: Re: [PATCH] i2c: synquacer: fix fence-post error in retry loop

On 9 May 2018 at 21:47, Peter Rosin <peda@...ntia.se> wrote:
> There is a difference between attempts and retries.
>
> Signed-off-by: Peter Rosin <peda@...ntia.se>

Acked-by: Ard Biesheuvel <ard.biesheuvel@...aro.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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ