U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Brüns, Stefan" <Stefan.Bruens@rwth-aachen.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] drivers: usb: fsl-dt-fixup: Fix the dt for multiple USB nodes in single traversal of device tree
Date: Fri, 28 Oct 2016 14:58:39 +0000	[thread overview]
Message-ID: <1890143.VexhhzDxrz@sbruens-linux> (raw)
In-Reply-To: <aabfaafb-f163-7162-64c9-e0020f91ff11@denx.de>

On Freitag, 28. Oktober 2016 01:52:26 CEST Marek Vasut wrote:
[...]
> > +
> > +enum fdt_fsl_usb_erratum {
> > +	A006261,
> > +	A007075,
> > +	A007792,
> > +	A005697,
> > +	A008751,
> > +	FSL_USB_ERRATUM_END
> 
> The compiler can assign completely arbitrary numbers to the enum
> elements. Moreover, you don't need this "terminating entry" anyway, see
> below.

Not true. According to 
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf

6.7.2.2  Enumeration specifiers
...
An enumerator with = defines its enumeration constant as the value of the 
constant expression.  If the first enumerator has no =, the value of its 
enumeration constant is 0. Each subsequent enumerator with no = defines its 
enumeration constant as the value of the constant expression obtained by 
adding 1 to the value of the previous enumeration constant.

Kind regards,

Stefan

  reply	other threads:[~2016-10-28 14:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-27  6:56 [U-Boot] [PATCH v3] drivers: usb: fsl-dt-fixup: Fix the dt for multiple USB nodes in single traversal of device tree Sriram Dash
2016-10-27 23:52 ` Marek Vasut
2016-10-28 14:58   ` Brüns, Stefan [this message]
2016-11-02  8:30   ` Sriram Dash
2016-11-02  9:36     ` Marek Vasut

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=1890143.VexhhzDxrz@sbruens-linux \
    --to=stefan.bruens@rwth-aachen.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