From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Br=FCns=2C_Stefan?= Date: Fri, 28 Oct 2016 14:58:39 +0000 Subject: [U-Boot] [PATCH v3] drivers: usb: fsl-dt-fixup: Fix the dt for multiple USB nodes in single traversal of device tree In-Reply-To: References: <1477551400-21921-1-git-send-email-sriram.dash@nxp.com> Message-ID: <1890143.VexhhzDxrz@sbruens-linux> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.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