[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7c06dbdf-e76c-483f-9561-9aebf8811547@tuxon.dev>
Date: Sat, 24 Aug 2024 18:52:22 +0300
From: claudiu beznea <claudiu.beznea@...on.dev>
To: Alexander Dahl <ada@...rsis.com>
Cc: Christian Melki <christian.melki@...ata.com>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
"moderated list:MICROCHIP OTPC DRIVER"
<linux-arm-kernel@...ts.infradead.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 02/12] nvmem: microchip-otpc: Fix swapped 'sleep' and
'timeout' parameters
On 21.08.2024 13:59, Alexander Dahl wrote:
> Makes no sense to have a timeout shorter than the sleep time, it would
> run into timeout right after the first sleep already.
> While at it, use a more specific macro instead of the generic one, which
> does exactly the same, but needs less parameters.
>
> Signed-off-by: Alexander Dahl <ada@...rsis.com>
Please add a Fixes tag.
> ---
> drivers/nvmem/microchip-otpc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvmem/microchip-otpc.c b/drivers/nvmem/microchip-otpc.c
> index 03e60b99f2c9..bd3383eabdf6 100644
> --- a/drivers/nvmem/microchip-otpc.c
> +++ b/drivers/nvmem/microchip-otpc.c
> @@ -87,8 +87,8 @@ static int mchp_otpc_prepare_read(struct mchp_otpc *otpc,
> writel_relaxed(tmp, otpc->base + MCHP_OTPC_CR);
>
> /* Wait for packet to be transferred into temporary buffers. */
> - return read_poll_timeout(readl_relaxed, tmp, !(tmp & MCHP_OTPC_SR_READ),
> - 10000, 2000, false, otpc->base + MCHP_OTPC_SR);
> + return readl_relaxed_poll_timeout(otpc->base + MCHP_OTPC_SR, tmp,
> + !(tmp & MCHP_OTPC_SR_READ), 2000, 10000);
> }
>
> /*
Powered by blists - more mailing lists