Skip to contentSkip to conversation

mm/cma.c: change pr_info to pr_err for cma_alloc fail log

PATCH New [email protected] 1 participant 1 message Nov 16, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 52/131 mm/cma.c: change pr_info to pr_err for cma_alloc fail log

From: Pintu Agarwal <[email protected]>
Subject: mm/cma.c: change pr_info to pr_err for cma_alloc fail log

It was observed that under cma_alloc fail log, pr_info was used instead of pr_err. This will lead to problems if printk debug level is set to below
7. In this case the cma_alloc failure log will not be captured in the log and it will be difficult to debug.

Simply replace the pr_info with pr_err to capture failure log.

---

 mm/cma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/cma.c renamed from mm/cma.c~cma-change-pr_info-to-pr_err-for-cma_alloc-fail-log +1 -1
diff -puN mm/cma.c~cma-change-pr_info-to-pr_err-for-cma_alloc-fail-log mm/cma.c
@@ -461,7 +461,7 @@ struct page *cma_alloc(struct cma *cma,
 	trace_cma_alloc(pfn, page, count, align);
 
 	if (ret && !(gfp_mask & __GFP_NOWARN)) {
-		pr_info("%s: alloc failed, req-size: %zu pages, ret: %d\n",
+		pr_err("%s: alloc failed, req-size: %zu pages, ret: %d\n",
 			__func__, count, ret);
 		cma_debug_show_areas(cma);
 	}

_