diff options
author | Boris Brezillon <[email protected]> | 2017-10-13 15:58:01 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2017-10-13 16:18:32 -0700 |
commit | ef4650144e76ae361fe4b8c9a0afcd53074cd520 (patch) | |
tree | e0bc28011b66c1eaa2373e29379992fa302280ff | |
parent | 51962a9d437f0d580c04cd2c4abc2bd417200da2 (diff) |
mm/cma.c: take __GFP_NOWARN into account in cma_alloc()
cma_alloc() unconditionally prints an INFO message when the CMA
allocation fails. Make this message conditional on the non-presence of
__GFP_NOWARN in gfp_mask.
This patch aims at removing INFO messages that are displayed when the
VC4 driver tries to allocate buffer objects. From the driver
perspective an allocation failure is acceptable, and the driver can
possibly do something to make following allocation succeed (like
flushing the VC4 internal cache).
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Boris Brezillon <[email protected]>
Acked-by: Laura Abbott <[email protected]>
Cc: Jaewon Kim <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Eric Anholt <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/cma.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -460,7 +460,7 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align, trace_cma_alloc(pfn, page, count, align); - if (ret) { + if (ret && !(gfp_mask & __GFP_NOWARN)) { pr_info("%s: alloc failed, req-size: %zu pages, ret: %d\n", __func__, count, ret); cma_debug_show_areas(cma); |