[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFCwf12iuz-q8U7_VEJvxKZpzfauKASjMDHOk7HMncuBnAyo4w@mail.gmail.com>
Date: Wed, 5 Aug 2020 13:20:02 +0300
From: Oded Gabbay <oded.gabbay@...il.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Omer Shpigelman <oshpigelman@...ana.ai>,
Ofir Bitton <obitton@...ana.ai>,
Tomer Tayar <ttayar@...ana.ai>,
"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] habanalabs: Fix a loop in gaudi_extract_ecc_info()
On Wed, Aug 5, 2020 at 12:51 PM Dan Carpenter <dan.carpenter@...cle.com> wrote:
>
> The condition was reversed. It should have been less than instead of
> greater than. The result is that we never enter the loop.
>
> Fixes: fcc6a4e60678 ("habanalabs: Extract ECC information from FW")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
> drivers/misc/habanalabs/gaudi/gaudi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c
> index 00a0a7238d81..de2f81b80ced 100644
> --- a/drivers/misc/habanalabs/gaudi/gaudi.c
> +++ b/drivers/misc/habanalabs/gaudi/gaudi.c
> @@ -5215,7 +5215,7 @@ static int gaudi_extract_ecc_info(struct hl_device *hdev,
> *memory_wrapper_idx = 0xFF;
>
> /* Iterate through memory wrappers, a single bit must be set */
> - for (i = 0 ; i > num_mem_regs ; i++) {
> + for (i = 0 ; i < num_mem_regs ; i++) {
> err_addr += i * 4;
> err_word = RREG32(err_addr);
> if (err_word) {
> --
> 2.27.0
>
This patch is:
Reviewed-by: Oded Gabbay <oded.gabbay@...il.com>
Thanks!
Applied to -fixes
Powered by blists - more mailing lists