mm: use proper type for cma_[alloc|release] 28/262728/3 accepted/tizen/unified/20210825.085451 submit/tizen/20210825.044457
authorMinchan Kim <minchan@kernel.org>
Wed, 21 Apr 2021 04:44:12 +0000 (14:44 +1000)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 19 Aug 2021 02:52:41 +0000 (02:52 +0000)
commit9116c4264c0881d1b6aed37d02b68521a9947075
treed668ea0cd6e206225d844d7a859ed1c94b73e7eb
parent80a582d1f8d92dab248183a84ed7fb1cf2f4ee68
mm: use proper type for cma_[alloc|release]

size_t in cma_alloc is confusing since it makes people think it's byte
count, not pages.  Change it to unsigned long[1].

The unsigned int in cma_release is also not right so change it.  Since we
have unsigned long in cma_release, free_contig_range should also respect
it.

[1] 67a2e213e7e9, mm: cma: fix incorrect type conversion for size during dma allocation

Link: https://lore.kernel.org/linux-mm/20210324043434.GP1719932@casper.infradead.org/
Link: https://lkml.kernel.org/r/20210331164018.710560-1-minchan@kernel.org
Signed-off-by: Minchan Kim <minchan@kernel.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Origin: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=78fa51503fdbe463c96eef4c3cf69ca54032647a
Signed-off-by: Ɓukasz Stelmach <l.stelmach@samsung.com>
Change-Id: Ie6de7e88bdae134120d2d88178e5a71cd00bd460
include/linux/cma.h
include/linux/gfp.h
include/trace/events/cma.h
mm/cma.c
mm/page_alloc.c