From cddd337a70d2e574658879618323de9e3ac347d4 Mon Sep 17 00:00:00 2001 From: Zhenhua Huang Date: Wed, 3 Feb 2021 13:30:49 +0800 Subject: [PATCH] mm: cma: Print correct request pages In case of cma allocation failure, req-size is logged, but instead of requested size we are printing total size. Fix it. Fixes: 45422bc880 ("mm: cma: Print region name on failure") Change-Id: Ifc96209a0ccdb295fbb9767d3d93b3a567fa16fd Signed-off-by: Zhenhua Huang --- mm/cma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/cma.c b/mm/cma.c index 35016b56b246..f20d9b9b68e5 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -561,7 +561,7 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align, if (ret && !no_warn) { pr_err("%s: %s: alloc failed, req-size: %zu pages, ret: %d\n", - __func__, cma->name, cma->count, ret); + __func__, cma->name, count, ret); cma_debug_show_areas(cma); }