From: Christophe JAILLET Date: Fri, 16 Oct 2020 03:11:25 +0000 (-0700) Subject: lib/scatterlist.c: avoid a double memset X-Git-Tag: perf-urgent-2020-10-25~24^2~42 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6ed9b92e290b530197c2dda2271f5312abc475e6;p=users%2Fdwmw2%2Flinux.git lib/scatterlist.c: avoid a double memset 'sgl' is zeroed a few lines below in 'sg_init_table()'. There is no need to clear it twice. Remove the redundant initialization. Signed-off-by: Christophe JAILLET Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200920071544.368841-1-christophe.jaillet@wanadoo.fr Signed-off-by: Linus Torvalds --- diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 5d63a8857f361..d94628fa33494 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c @@ -504,7 +504,7 @@ struct scatterlist *sgl_alloc_order(unsigned long long length, nalloc++; } sgl = kmalloc_array(nalloc, sizeof(struct scatterlist), - (gfp & ~GFP_DMA) | __GFP_ZERO); + gfp & ~GFP_DMA); if (!sgl) return NULL;