Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1553643

[PATCH] of: remove redundant memset in overlay

From YiPing Xu <xuyiping@hisilicon.com>
Newsgroups linux.kernel
Subject [PATCH] of: remove redundant memset in overlay
Date 2017-01-07 12:10 +0100
Message-ID <sWX2N-7VT-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: XuYing <xuyiping@hisilicon.com>

memset in of_build_overlay_info is redundant, the ovinfo has been
zeroed in of_fill_overlay_info when error.

Signed-off-by: YiPing Xu <xuyiping@hisilicon.com>
---
 drivers/of/overlay.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index 0d4cda7..4b1b6b3 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -314,7 +314,6 @@ static int of_build_overlay_info(struct of_overlay *ov,
 
 	cnt = 0;
 	for_each_child_of_node(tree, node) {
-		memset(&ovinfo[cnt], 0, sizeof(*ovinfo));
 		err = of_fill_overlay_info(ov, node, &ovinfo[cnt]);
 		if (err == 0)
 			cnt++;
-- 
1.9.1

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] of: remove redundant memset in overlay YiPing Xu <xuyiping@hisilicon.com> - 2017-01-07 12:10 +0100
  Re: [PATCH] of: remove redundant memset in overlay Frank Rowand <frowand.list@gmail.com> - 2017-01-09 20:00 +0100
  Re: [PATCH] of: remove redundant memset in overlay Rob Herring <robh@kernel.org> - 2017-01-10 06:40 +0100

csiph-web