From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Sat, 27 Apr 2019 10:46:43 -0400 Subject: [U-Boot] [U-Boot, v2, 2/2] dtb_platdata.py: prevent define generation of alias In-Reply-To: <20190416113158.289833-3-hs@denx.de> References: <20190416113158.289833-3-hs@denx.de> Message-ID: <20190427144643.GP31207@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Apr 16, 2019 at 01:31:58PM +0200, Heiko Schocher wrote: > generate define for an alias only if the struct is not > created already. > > This prevents compilerwarning: > PLAT spl/dts/dt-platdata.o > spl/dts/dt-platdata.c:11:46: error: missing braces around initializer [-Werror=missing-braces] > static const struct dtd_simple_bus dtv_ahb = { > ^ > spl/dts/dt-platdata.c:20:46: error: missing braces around initializer [-Werror=missing-braces] > static const struct dtd_simple_bus dtv_apb = { > ^ > cc1: all warnings being treated as errors > > on the at91 based taurus board. Reason is in at91sam9260.dtsi > is defined: > > ahb { > compatible = "simple-bus"; > ranges; > > and later: > > pinctrl: pinctrl at fffff400 { > compatible = "atmel,at91rm9200-pinctrl", "simple-bus"; > ranges = <0xfffff400 0xfffff400 0x600>; > > without this patch dtoc generates: > > struct dtd_atmel_at91rm9200_pinctrl { > fdt32_t atmel_mux_mask[6]; > fdt32_t ranges[3]; > fdt32_t reg[6]; > }; > > struct dtd_simple_bus { > bool ranges; > }; > > "#define dtd_simple_bus dtd_atmel_at91rm9200_pinctrl" > > and the line with "define dtd_simple_bus..." introduces > the warning. This define is not needed. > > Signed-off-by: Heiko Schocher Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: