From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] lib/crc16: use non-C99 loop style
Date: Thu, 14 Feb 2019 07:22:10 -0500 [thread overview]
Message-ID: <20190214122210.GD21737@bill-the-cat> (raw)
In-Reply-To: <1AE354E8-4434-485A-9B67-719F3D414E2B@theobroma-systems.com>
On Thu, Feb 14, 2019 at 12:35:12PM +0100, Philipp Tomsich wrote:
> Tom & Thomas,
>
> > On 14.02.2019, at 08:56, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> >
> > However, generally speaking is U-Boot interested in allowing this kind
> > of C99 variable declaration ? For example, the Linux kernel coding
> > style doesn't allow this, but perhaps U-Boot has made a difference
> > choice here.
>
>
> I took the opportunity to see how widespread the use of this style already
> is in U-Boot (as it will eventually creep in, now that we’ve moved to GCC6
> or newer) and there’s only a few occurences to date:
>
> board/synopsys/hsdk/env-lib.c: for (u32 i = 0; i < NR_CPUS; i++) {
> board/synopsys/hsdk/env-lib.c: for (u32 i = 0; i < NR_CPUS; i++) {
> board/synopsys/hsdk/env-lib.c: for (u32 i = 0; i < NR_CPUS; i++) {
> board/synopsys/hsdk/env-lib.c: for (u32 i = 0; map[i].env_name; i++)
> board/synopsys/hsdk/env-lib.c: for (u32 i = 0; map[i].env_name; i++)
> board/synopsys/hsdk/env-lib.c: for (u32 i = 0; map[i].env_name; i++) {
> board/synopsys/hsdk/env-lib.c: for (u32 i = 0; map[i].env_name; i++) {
> board/synopsys/hsdk/env-lib.c: for (u32 i = 0; map[i].env_name; i++) {
> board/synopsys/hsdk/env-lib.c: for (u32 i = 0; map[i].env_name; i++) {
> board/synopsys/hsdk/hsdk.c: for (u32 i = 0; i < NR_CPUS; i++) {
> board/synopsys/hsdk/hsdk.c: for (u32 i = 0; i < NR_CPUS; i++) {
> board/synopsys/hsdk/hsdk.c: for (u32 i = 0; i < NR_CPUS; i++) {
> board/synopsys/hsdk/hsdk.c: for (u32 i = 0; i < NR_CPUS; i++)
> board/synopsys/hsdk/hsdk.c: for (u32 i = MASTER_CPU_ID + 1; i < NR_CPUS; i++)
> board/synopsys/hsdk/hsdk.c: for (u32 i = 0; i < NR_CPUS; i++) {
> lib/crc16.c: for (int i = 0; i < len; i++)
Well, lets go with the C99 flag instead for v2, thanks again!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190214/23511b55/attachment.sig>
prev parent reply other threads:[~2019-02-14 12:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-13 21:57 [U-Boot] [PATCH] lib/crc16: use non-C99 loop style Thomas Petazzoni
2019-02-13 22:50 ` Philipp Tomsich
2019-02-14 0:31 ` Tom Rini
2019-02-14 0:57 ` Philipp Tomsich
2019-02-14 7:56 ` Thomas Petazzoni
2019-02-14 11:35 ` Philipp Tomsich
2019-02-14 12:22 ` Tom Rini [this message]
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=20190214122210.GD21737@bill-the-cat \
--to=trini@konsulko.com \
--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