Skip to content

Commit 6825b5f

Browse files
Marco Paganiogabbay
authored andcommitted
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 <[email protected]> Reviewed-by: Oded Gabbay <[email protected]> Signed-off-by: Oded Gabbay <[email protected]>
1 parent 5908560 commit 6825b5f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/misc/habanalabs/gaudi2/gaudi2.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9386,6 +9386,7 @@ static void gaudi2_restore_user_sm_registers(struct hl_device *hdev)
93869386
gaudi2_memset_device_lbw(hdev, cq_lbw_data_addr, size, 0);
93879387
gaudi2_memset_device_lbw(hdev, cq_base_l_addr, size, 0);
93889388
gaudi2_memset_device_lbw(hdev, cq_base_h_addr, size, 0);
9389+
gaudi2_memset_device_lbw(hdev, cq_size_addr, size, 0);
93899390

93909391
cq_lbw_l_addr = mmDCORE0_SYNC_MNGR_GLBL_LBW_ADDR_L_0 + DCORE_OFFSET;
93919392
cq_lbw_h_addr = mmDCORE0_SYNC_MNGR_GLBL_LBW_ADDR_H_0 + DCORE_OFFSET;

0 commit comments

Comments
 (0)