Skip to content

Commit 4a1cb63

Browse files
Pintu Kumarsumitsemwal
authored andcommitted
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 <[email protected]> Reviewed-by: T.J. Mercier <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 16c51e4 commit 4a1cb63

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/dma-buf/heaps/cma_heap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,13 +309,13 @@ static struct dma_buf *cma_heap_allocate(struct dma_heap *heap,
309309
struct page *page = cma_pages;
310310

311311
while (nr_clear_pages > 0) {
312-
void *vaddr = kmap_atomic(page);
312+
void *vaddr = kmap_local_page(page);
313313

314314
memset(vaddr, 0, PAGE_SIZE);
315-
kunmap_atomic(vaddr);
315+
kunmap_local(vaddr);
316316
/*
317317
* Avoid wasting time zeroing memory if the process
318-
* has been killed by by SIGKILL
318+
* has been killed by SIGKILL.
319319
*/
320320
if (fatal_signal_pending(current))
321321
goto free_cma;

0 commit comments

Comments
 (0)