]> git.baikalelectronics.ru Git - kernel.git/commit
mm: use proper type for cma_[alloc|release]
authorMinchan Kim <minchan@kernel.org>
Wed, 5 May 2021 01:37:34 +0000 (18:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 5 May 2021 18:27:24 +0000 (11:27 -0700)
commit8e8b0ef6cb832acb92d07ae0d7e19b1e745a610f
treed5159574ddf321d8d86d47b01d41c6f6fe93e68b
parentc1691300e9c4241a4cdae7b3c5c2564496a93305
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] 46c3b0dc7d09, 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>
include/linux/cma.h
include/linux/gfp.h
include/trace/events/cma.h
mm/cma.c
mm/page_alloc.c