[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFCwf12yeyMb3WgCPqb8sFUk5PmzrXU=sCf3oWG9FKdCCS_S1w@mail.gmail.com>
Date: Wed, 23 Nov 2022 16:32:41 +0200
From: Oded Gabbay <ogabbay@...nel.org>
To: Marco Pagani <marpagan@...hat.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Tom Rix <trix@...hat.com>, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev
Subject: Re: [PATCH] habanalabs/gaudi2: added memset for the cq_size register
On Wed, Nov 23, 2022 at 10:59 AM Marco Pagani <marpagan@...hat.com> wrote:
>
> The clang-analyzer reported a warning: "Value stored to
> 'cq_size_addr' is never read".
>
> The cq_size register of dcore0 is not being zeroed using
> gaudi2_memset_device_lbw(), along with the other cq_* registers,
> even though the corresponding cq_size_addr variable is set.
>
> Signed-off-by: Marco Pagani <marpagan@...hat.com>
> ---
> drivers/misc/habanalabs/gaudi2/gaudi2.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/misc/habanalabs/gaudi2/gaudi2.c b/drivers/misc/habanalabs/gaudi2/gaudi2.c
> index 65e6cae6100a..05f30adefb32 100644
> --- a/drivers/misc/habanalabs/gaudi2/gaudi2.c
> +++ b/drivers/misc/habanalabs/gaudi2/gaudi2.c
> @@ -9165,6 +9165,7 @@ static void gaudi2_restore_user_sm_registers(struct hl_device *hdev)
> gaudi2_memset_device_lbw(hdev, cq_lbw_data_addr, size, 0);
> gaudi2_memset_device_lbw(hdev, cq_base_l_addr, size, 0);
> gaudi2_memset_device_lbw(hdev, cq_base_h_addr, size, 0);
> + gaudi2_memset_device_lbw(hdev, cq_size_addr, size, 0);
>
> cq_lbw_l_addr = mmDCORE0_SYNC_MNGR_GLBL_LBW_ADDR_L_0 + DCORE_OFFSET;
> cq_lbw_h_addr = mmDCORE0_SYNC_MNGR_GLBL_LBW_ADDR_H_0 + DCORE_OFFSET;
> --
> 2.38.1
>
Reviewed-by: Oded Gabbay <ogabbay@...nel.org>
Applied to -next.
Thanks,
Oded
Powered by blists - more mailing lists