mm/cma.c: change pr_info to pr_err for cma_alloc fail log
authorPintu Agarwal <[email protected]>
Thu, 16 Nov 2017 01:34:26 +0000 (17:34 -0800)
committerLinus Torvalds <[email protected]>
Thu, 16 Nov 2017 02:21:03 +0000 (18:21 -0800)
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.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Pintu Agarwal <[email protected]>
Cc: Laura Abbott <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Jaewon Kim <[email protected]>
Cc: Doug Berger <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/cma.c

index 022e52bd83703e50408cc170b5ba91bcdb038aff..0607729abf3b5f937fbc76b8148c0acd61ed9e56 100644 (file)
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -461,7 +461,7 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
        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);
        }