All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] of: remove redundant memset in overlay
@ 2017-01-07 11:04 ` YiPing Xu
  0 siblings, 0 replies; 5+ messages in thread
From: YiPing Xu @ 2017-01-07 11:04 UTC (permalink / raw)
  To: xuyiping, pantelis.antoniou, robh+dt, frowand.list, devicetree,
	linux-kernel

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] of: remove redundant memset in overlay
@ 2017-01-07 11:04 ` YiPing Xu
  0 siblings, 0 replies; 5+ messages in thread
From: YiPing Xu @ 2017-01-07 11:04 UTC (permalink / raw)
  To: xuyiping-C8/M+/jPZTeaMJb+Lgu22Q,
	pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	frowand.list-Re5JQEeQqe8AvxtiuMwx3w,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

From: XuYing <xuyiping-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>

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-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
---
 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

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] of: remove redundant memset in overlay
@ 2017-01-09 18:50   ` Frank Rowand
  0 siblings, 0 replies; 5+ messages in thread
From: Frank Rowand @ 2017-01-09 18:50 UTC (permalink / raw)
  To: YiPing Xu, pantelis.antoniou, robh+dt, devicetree, linux-kernel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] of: remove redundant memset in overlay
@ 2017-01-09 18:50   ` Frank Rowand
  0 siblings, 0 replies; 5+ messages in thread
From: Frank Rowand @ 2017-01-09 18:50 UTC (permalink / raw)
  To: YiPing Xu, pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Hi Rob,

On 01/07/17 03:04, YiPing Xu wrote:
> From: XuYing <xuyiping-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
> 
> 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-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
> ---
>  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-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org>

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

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] of: remove redundant memset in overlay
  2017-01-07 11:04 ` YiPing Xu
  (?)
  (?)
@ 2017-01-10  5:35 ` Rob Herring
  -1 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2017-01-10  5:35 UTC (permalink / raw)
  To: YiPing Xu; +Cc: pantelis.antoniou, frowand.list, devicetree, linux-kernel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-10  5:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-07 11:04 [PATCH] of: remove redundant memset in overlay YiPing Xu
2017-01-07 11:04 ` YiPing Xu
2017-01-09 18:50 ` Frank Rowand
2017-01-09 18:50   ` Frank Rowand
2017-01-10  5:35 ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.