Skip to content

Commit c47d3ec

Browse files
tobluxwangjinchao
authored andcommitted
accel/habanalabs/gaudi2: Use kvfree() for memory allocated with kvcalloc()
Use kvfree() to fix the following Coccinelle/coccicheck warning reported by kfree_mismatch.cocci: WARNING kvmalloc is used to allocate this memory at line 10398 Fixes: f728c17 ("accel/habanalabs/gaudi2: move HMMU page tables to device memory") Reported-by: Qianfeng Rong <[email protected]> Closes: https://patch.msgid.link/[email protected] Signed-off-by: Thorsten Blum <[email protected]> [lukas: acknowledge Qianfeng, adjust Thorsten's domain, add Fixes tag] Signed-off-by: Lukas Wunner <[email protected]> Reviewed-by: Tomer Tayar <[email protected]> Cc: [email protected] # v6.9+ Link: https://patch.msgid.link/[email protected]
1 parent 28af4dc commit c47d3ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/accel/habanalabs/gaudi2/gaudi2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10437,7 +10437,7 @@ static int gaudi2_memset_device_memory(struct hl_device *hdev, u64 addr, u64 siz
1043710437
(u64 *)(lin_dma_pkts_arr), DEBUGFS_WRITE64);
1043810438
WREG32(sob_addr, 0);
1043910439

10440-
kfree(lin_dma_pkts_arr);
10440+
kvfree(lin_dma_pkts_arr);
1044110441

1044210442
return rc;
1044310443
}

0 commit comments

Comments
 (0)