accel/habanalabs/gaudi2: Use kvfree() for memory allocated with kvcalloc()
PATCH RESEND 1/1 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
--- drivers/accel/habanalabs/gaudi2/gaudi2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/accel/habanalabs/gaudi2/gaudi2.c +1 -1
@@ -10437,7 +10437,7 @@ static int gaudi2_memset_device_memory(struct hl_device *hdev, u64 addr, u64 siz (u64 *)(lin_dma_pkts_arr), DEBUGFS_WRITE64);WREG32 (sob_addr,0 ); -kfree (lin_dma_pkts_arr); +kvfree (lin_dma_pkts_arr);return rc; }
Signature · 1 line
2.46.0
Lukas Wunner
AppliedQuoted 7 lines · Thorsten Blum
Use
kvfree()to fix the following Coccinelle/coccicheck warning reported bykfree_mismatch.cocci:WARNING kvmalloc is used to allocate this memory at line 10398
Reviewed-by Tomer Tayar <[email protected]>Signed-off-by Thorsten Blum <[email protected]>
Applied to drm-misc-fixes, thanks.
You used toblux.com in the Signed-off-by tag but have since amended .mailmap to use linux.dev instead. To avoid a mismatch between the Signed-off-by tag and the commit author, I've taken the liberty to hand-edit the former to use linux.dev.
I've also added a Fixes tag and stable designation.
Qianfeng Rong later submitted an identical patch, so I've added a Reported-by tag to acknowledge that:
https://patch.msgid.link/[email protected]
Thanks,
Lukas