From 2035ee87130d03bd9ad3271b8ee4ef060ed07c91 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 14 Aug 2019 09:28:45 +1000 Subject: [PATCH] mm-kmemleak-use-the-memory-pool-for-early-allocations-checkpatch-fixes WARNING: else is not generally useful after a break or return #173: FILE: mm/kmemleak.c:426: + return object; + else WARNING: line over 80 characters #231: FILE: mm/kmemleak.c:793: + area = kmem_cache_alloc(scan_area_cache, gfp_kmemleak_mask(gfp)); total: 0 errors, 2 warnings, 468 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. ./patches/mm-kmemleak-use-the-memory-pool-for-early-allocations.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Stephen Rothwell --- mm/kmemleak.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/kmemleak.c b/mm/kmemleak.c index bcb05b9b4eb497..a78f755dcace9b 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -423,8 +423,7 @@ static struct kmemleak_object *mem_pool_alloc(gfp_t gfp) object = kmem_cache_alloc(object_cache, gfp_kmemleak_mask(gfp)); if (object) return object; - else - WARN_ON_ONCE(1); + WARN_ON_ONCE(1); } /* slab allocation failed, try the memory pool */