From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 02/10] board_init_f_mem(): Don't require memset()
Date: Thu, 16 Apr 2015 06:25:34 +0200 [thread overview]
Message-ID: <20150416042534.52CD7383285@gemini.denx.de> (raw)
In-Reply-To: <1429146849-11994-3-git-send-email-sjg@chromium.org>
Dear Simon Glass,
In message <1429146849-11994-3-git-send-email-sjg@chromium.org> you wrote:
> Unfortunately memset() is not always available, so provide a substitute when
> needed.
> +#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBGENERIC_SUPPORT)
> memset((void *)gd, '\0', sizeof(*gd));
> +#else
> + int *ptr = (int *)gd;
> + int *end = (int *)(gd + 1);
> +
> + while (ptr < end)
> + *ptr++ = 0;
> +#endif
Please don't declare variables in the middle of the code.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Command, n.:
Statement presented by a human and accepted by a computer
in such a manner as to make the human feel as if he is in control.
next prev parent reply other threads:[~2015-04-16 4:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-16 1:13 [U-Boot] [PATCH 0/10] Make more use of board_init_f_mem() Simon Glass
2015-04-16 1:14 ` [U-Boot] [PATCH 01/10] Move board_init_f_mem() into a common location Simon Glass
2015-04-16 9:32 ` Jeroen Hofstee
2015-04-17 22:56 ` Simon Glass
2015-04-17 16:37 ` Masahiro Yamada
2015-04-17 22:55 ` Simon Glass
2015-04-16 1:14 ` [U-Boot] [PATCH 02/10] board_init_f_mem(): Don't require memset() Simon Glass
2015-04-16 4:25 ` Wolfgang Denk [this message]
2015-04-19 14:22 ` Simon Glass
2015-04-21 3:42 ` Masahiro Yamada
2015-04-21 3:47 ` Simon Glass
2015-04-21 4:30 ` Masahiro Yamada
2015-04-24 4:15 ` Simon Glass
2015-04-16 1:14 ` [U-Boot] [PATCH 03/10] board_init_f_mem(): Round down for stack alignment Simon Glass
2015-04-16 1:14 ` [U-Boot] [PATCH 04/10] board_init_f_mem(): Don't create an unused early malloc() area Simon Glass
2015-04-20 12:12 ` Masahiro Yamada
2015-04-16 1:14 ` [U-Boot] [PATCH 05/10] arm: Adjust start-up code to use board_init_f_mem() Simon Glass
2015-04-16 1:14 ` [U-Boot] [PATCH 06/10] arm64: " Simon Glass
2015-04-16 1:14 ` [U-Boot] [PATCH 07/10] x86: Add a TODO to call board_init_f_mem() Simon Glass
2015-04-16 1:14 ` [U-Boot] [PATCH 08/10] microblaze: " Simon Glass
2015-04-16 1:14 ` [U-Boot] [PATCH 09/10] zynq: Move SPL console init out of board_init_f() Simon Glass
2015-04-20 12:15 ` Masahiro Yamada
2015-04-16 1:14 ` [U-Boot] [PATCH 10/10] Revert "ARM: zynq: disable CONFIG_SYS_MALLOC_F to fix MMC boot" Simon Glass
2015-04-20 12:08 ` Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150416042534.52CD7383285@gemini.denx.de \
--to=wd@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox