From: Steven Rostedt Impact: clean up A NULL pointer to kfree is no longer unlikely, as seen by the annotated branch profiler: correct incorrect % Function File Line ------- --------- - -------- ---- ---- 728571 1315540 64 kfree slab.c 3719 This makes sense, since we now encourage developers to just call kfree without checking for NULL. Signed-off-by: Steven Rostedt --- mm/slab.c | 2 +- mm/slob.c | 2 +- mm/slub.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/slab.c b/mm/slab.c index 4d00855..0386c33 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -3716,7 +3716,7 @@ void kfree(const void *objp) struct kmem_cache *c; unsigned long flags; - if (unlikely(ZERO_OR_NULL_PTR(objp))) + if (ZERO_OR_NULL_PTR(objp)) return; local_irq_save(flags); kfree_debugcheck(objp); diff --git a/mm/slob.c b/mm/slob.c index 52bc8a2..e077174 100644 --- a/mm/slob.c +++ b/mm/slob.c @@ -491,7 +491,7 @@ void kfree(const void *block) { struct slob_page *sp; - if (unlikely(ZERO_OR_NULL_PTR(block))) + if (ZERO_OR_NULL_PTR(block)) return; sp = (struct slob_page *)virt_to_page(block); diff --git a/mm/slub.c b/mm/slub.c index 0280eee..65dc436 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2743,7 +2743,7 @@ void kfree(const void *x) struct page *page; void *object = (void *)x; - if (unlikely(ZERO_OR_NULL_PTR(x))) + if (ZERO_OR_NULL_PTR(x)) return; page = virt_to_head_page(x); -- 1.6.2 -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/