+ mm-slob-remove-an-unnecessary-check-for-__gfp_zero.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/slob.c: remove an unnecessary check for __GFP_ZERO
has been added to the -mm tree.  Its filename is
     mm-slob-remove-an-unnecessary-check-for-__gfp_zero.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-slob-remove-an-unnecessary-check-for-__gfp_zero.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-slob-remove-an-unnecessary-check-for-__gfp_zero.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Miles Chen <miles.chen@xxxxxxxxxxxx>
Subject: mm/slob.c: remove an unnecessary check for __GFP_ZERO

Current flow guarantees a valid pointer when handling the __GFP_ZERO case.
So remove the unnecessary NULL pointer check.

Link: http://lkml.kernel.org/r/1507203141-11959-1-git-send-email-miles.chen@xxxxxxxxxxxx
Signed-off-by: Miles Chen <miles.chen@xxxxxxxxxxxx>
Cc: Christoph Lameter <cl@xxxxxxxxx>
Cc: Pekka Enberg <penberg@xxxxxxxxxx>
Cc: David Rientjes <rientjes@xxxxxxxxxx>
Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/slob.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN mm/slob.c~mm-slob-remove-an-unnecessary-check-for-__gfp_zero mm/slob.c
--- a/mm/slob.c~mm-slob-remove-an-unnecessary-check-for-__gfp_zero
+++ a/mm/slob.c
@@ -329,7 +329,7 @@ static void *slob_alloc(size_t size, gfp
 		BUG_ON(!b);
 		spin_unlock_irqrestore(&slob_lock, flags);
 	}
-	if (unlikely((gfp & __GFP_ZERO) && b))
+	if (unlikely(gfp & __GFP_ZERO))
 		memset(b, 0, size);
 	return b;
 }
_

Patches currently in -mm which might be from miles.chen@xxxxxxxxxxxx are

dma-debug-fix-incorrect-pfn-calculation.patch
mm-slob-remove-an-unnecessary-check-for-__gfp_zero.patch
checkpatch-support-function-pointers-for-unnamed-function-definition-arguments.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux