Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kexec: remove some re zero-assignment
@ 2014-11-29  0:45 HuKeping
  2014-12-02  1:50 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: HuKeping @ 2014-11-29  0:45 UTC (permalink / raw)
  To: kexec; +Cc: horms, peifeiyue, sdu.liu

since we have already cleared kexec_info with memset,
there is no need to do that again to the struct members.

Signed-off-by: Hu Keping <hukeping@huawei.com>
---
 kexec/kexec.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/kexec/kexec.c b/kexec/kexec.c
index a5e78c6..b088916 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -662,10 +662,6 @@ static int my_load(const char *type, int fileind, int argc, char **argv,
 	int guess_only = 0;
 
 	memset(&info, 0, sizeof(info));
-	info.segment = NULL;
-	info.nr_segments = 0;
-	info.entry = NULL;
-	info.backup_start = 0;
 	info.kexec_flags = kexec_flags;
 
 	result = 0;
-- 
1.8.5.5


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

* Re: [PATCH] kexec: remove some re zero-assignment
  2014-11-29  0:45 [PATCH] kexec: remove some re zero-assignment HuKeping
@ 2014-12-02  1:50 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2014-12-02  1:50 UTC (permalink / raw)
  To: HuKeping; +Cc: kexec, peifeiyue, sdu.liu

On Sat, Nov 29, 2014 at 08:45:32AM +0800, HuKeping wrote:
> since we have already cleared kexec_info with memset,
> there is no need to do that again to the struct members.
> 
> Signed-off-by: Hu Keping <hukeping@huawei.com>

Thanks, applied.

> ---
>  kexec/kexec.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/kexec/kexec.c b/kexec/kexec.c
> index a5e78c6..b088916 100644
> --- a/kexec/kexec.c
> +++ b/kexec/kexec.c
> @@ -662,10 +662,6 @@ static int my_load(const char *type, int fileind, int argc, char **argv,
>  	int guess_only = 0;
>  
>  	memset(&info, 0, sizeof(info));
> -	info.segment = NULL;
> -	info.nr_segments = 0;
> -	info.entry = NULL;
> -	info.backup_start = 0;
>  	info.kexec_flags = kexec_flags;
>  
>  	result = 0;
> -- 
> 1.8.5.5
> 
> 
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
> 

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

end of thread, other threads:[~2014-12-02  1:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-29  0:45 [PATCH] kexec: remove some re zero-assignment HuKeping
2014-12-02  1:50 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox