From 48526e75139ceaf3c7ce040a96529273ba434a39 Mon Sep 17 00:00:00 2001 From: Patrick Daly Date: Thu, 25 Feb 2021 17:16:44 -0800 Subject: [PATCH] mm: cma: print region name on failure MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Print the name of the CMA region for convenience. This is useful information to have when cma_alloc() fails. [pdaly@codeaurora.org: print the "count" variable] Link: https://lkml.kernel.org/r/20210209142414.12768-1-georgi.djakov@linaro.org Link: https://lkml.kernel.org/r/20210208115200.20286-1-georgi.djakov@linaro.org Signed-off-by: Patrick Daly Signed-off-by: Georgi Djakov Acked-by: Minchan Kim Reviewed-by: David Hildenbrand Reviewed-by: Randy Dunlap Cc: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Origin: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=a052d4d13d88c2073d1339d9dce02cba7b4dc609 Signed-off-by: Łukasz Stelmach Change-Id: Id498bfa25916823d7e3d804db01691916fc8fac4 --- mm/cma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/cma.c b/mm/cma.c index a751ed4..ebcf221 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -486,8 +486,8 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align, } if (ret && !no_warn) { - pr_err("%s: alloc failed, req-size: %zu pages, ret: %d\n", - __func__, count, ret); + pr_err("%s: %s: alloc failed, req-size: %zu pages, ret: %d\n", + __func__, cma->name, count, ret); cma_debug_show_areas(cma); } -- 2.7.4