Re: [RESEND PATCH] accel/habanalabs/gaudi2: Use kvfree() for memory allocated with kvcalloc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31/05/2024 13:46, Thorsten Blum wrote:
> 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
>
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxxx>

Reviewed-by: Tomer Tayar <ttayar@xxxxxxxxx>

> ---
>   drivers/accel/habanalabs/gaudi2/gaudi2.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c b/drivers/accel/habanalabs/gaudi2/gaudi2.c
> index fa1c4feb9f89..8024047962ec 100644
> --- a/drivers/accel/habanalabs/gaudi2/gaudi2.c
> +++ b/drivers/accel/habanalabs/gaudi2/gaudi2.c
> @@ -10489,7 +10489,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;
>   }






[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux