From: Pintu Kumar Date: Tue, 1 Oct 2024 17:50:57 +0000 (+0530) Subject: dma-buf/heaps: replace kmap_atomic with kmap_local_page X-Git-Tag: microblaze-v6.16~14^2~23^2~239 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=4a1cb63bf321c1e498d3f19a6049e56838b18f82;p=linux-2.6-microblaze.git dma-buf/heaps: replace kmap_atomic with kmap_local_page Use of kmap_atomic/kunmap_atomic is deprecated, use kmap_local_page/kunmap_local instead. This is reported by checkpatch. Also fix repeated word issue. WARNING: Deprecated use of 'kmap_atomic', prefer 'kmap_local_page' instead + void *vaddr = kmap_atomic(page); WARNING: Deprecated use of 'kunmap_atomic', prefer 'kunmap_local' instead + kunmap_atomic(vaddr); WARNING: Possible repeated word: 'by' + * has been killed by by SIGKILL total: 0 errors, 3 warnings, 405 lines checked Signed-off-by: Pintu Kumar Reviewed-by: T.J. Mercier Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20241001175057.27172-1-quic_pintu@quicinc.com --- diff --git a/drivers/dma-buf/heaps/cma_heap.c b/drivers/dma-buf/heaps/cma_heap.c index 0e6e1982777c..9512d050563a 100644 --- a/drivers/dma-buf/heaps/cma_heap.c +++ b/drivers/dma-buf/heaps/cma_heap.c @@ -309,13 +309,13 @@ static struct dma_buf *cma_heap_allocate(struct dma_heap *heap, struct page *page = cma_pages; while (nr_clear_pages > 0) { - void *vaddr = kmap_atomic(page); + void *vaddr = kmap_local_page(page); memset(vaddr, 0, PAGE_SIZE); - kunmap_atomic(vaddr); + kunmap_local(vaddr); /* * Avoid wasting time zeroing memory if the process - * has been killed by by SIGKILL + * has been killed by SIGKILL. */ if (fatal_signal_pending(current)) goto free_cma;