[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200920071544.368841-1-christophe.jaillet@wanadoo.fr>
Date: Sun, 20 Sep 2020 09:15:44 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: akpm@...ux-foundation.org, natechancellor@...il.com,
geert+renesas@...der.be
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: [PATCH] lib/scatterlist: 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 <christophe.jaillet@...adoo.fr>
---
lib/scatterlist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index 5d63a8857f36..d94628fa3349 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;
--
2.25.1
Powered by blists - more mailing lists