Skip to content

Commit

Permalink
mm-kmemleak-use-the-memory-pool-for-early-allocations-checkpatch-fixes
Browse files Browse the repository at this point in the history
WARNING: else is not generally useful after a break or return
torvalds#173: FILE: mm/kmemleak.c:426:
+			return object;
+		else

WARNING: line over 80 characters
torvalds#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 <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
  • Loading branch information
akpm00 authored and sfrothwell committed Aug 13, 2019
1 parent 93ab75f commit 2035ee8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/kmemleak.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 2035ee8

Please sign in to comment.