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


Groups > linux.kernel > #1553643 > unrolled thread

[PATCH] of: remove redundant memset in overlay

Started byYiPing Xu <xuyiping@hisilicon.com>
First post2017-01-07 12:10 +0100
Last post2017-01-10 06:40 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [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

#1553643 — [PATCH] of: remove redundant memset in overlay

FromYiPing Xu <xuyiping@hisilicon.com>
Date2017-01-07 12:10 +0100
Subject[PATCH] of: remove redundant memset in overlay
Message-ID<sWX2N-7VT-3@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1554610

FromFrank Rowand <frowand.list@gmail.com>
Date2017-01-09 20:00 +0100
Message-ID<sXNkJ-7O3-3@gated-at.bofh.it>
In reply to#1553643
Hi Rob,

On 01/07/17 03:04, YiPing Xu wrote:
> 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++;
> 

Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>

I am in the midst of a cleanup of overlay.c.  I can add this patch to
my series if you would prefer.  And of course if I get delayed with
the series I would expect you to apply this one without my series if
you desire.

-Frank

[toc] | [prev] | [next] | [standalone]


#1554943

FromRob Herring <robh@kernel.org>
Date2017-01-10 06:40 +0100
Message-ID<sXXk5-5LU-5@gated-at.bofh.it>
In reply to#1553643
On Sat, Jan 07, 2017 at 07:04:27PM +0800, YiPing Xu wrote:
> 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(-)

Applied, thanks.

Rob

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web