[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221123085640.103084-1-marpagan@redhat.com>
Date: Wed, 23 Nov 2022 09:56:39 +0100
From: Marco Pagani <marpagan@...hat.com>
To: Oded Gabbay <ogabbay@...nel.org>, 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>
Cc: Marco Pagani <marpagan@...hat.com>, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev
Subject: [PATCH] habanalabs/gaudi2: added memset for the cq_size register
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
Powered by blists - more mailing lists