From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423134AbdAISvu (ORCPT ); Mon, 9 Jan 2017 13:51:50 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:32859 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423108AbdAISvr (ORCPT ); Mon, 9 Jan 2017 13:51:47 -0500 Subject: Re: [PATCH] of: remove redundant memset in overlay To: YiPing Xu , pantelis.antoniou@konsulko.com, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <1483787067-108430-1-git-send-email-xuyiping@hisilicon.com> From: Frank Rowand Message-ID: <5873DB83.4010606@gmail.com> Date: Mon, 9 Jan 2017 10:50:43 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <1483787067-108430-1-git-send-email-xuyiping@hisilicon.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On 01/07/17 03:04, YiPing Xu wrote: > From: XuYing > > 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 > --- > 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frank Rowand Subject: Re: [PATCH] of: remove redundant memset in overlay Date: Mon, 9 Jan 2017 10:50:43 -0800 Message-ID: <5873DB83.4010606@gmail.com> References: <1483787067-108430-1-git-send-email-xuyiping@hisilicon.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1483787067-108430-1-git-send-email-xuyiping-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: YiPing Xu , pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: devicetree@vger.kernel.org Hi Rob, On 01/07/17 03:04, YiPing Xu wrote: > From: XuYing > > 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 > --- > 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 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