From: Tom Rini Date: Thu, 7 May 2020 09:03:14 -0400 Subject: [PATCH] include/eeprom.h: fix build errors In-Reply-To: <20200218083843.3855-1-rasmus.villemoes@prevas.dk> References: <20200218083843.3855-1-rasmus.villemoes@prevas.dk> Message-ID: <20200507130314.GU12564@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, Feb 18, 2020 at 08:39:42AM +0000, Rasmus Villemoes wrote: > CMD_EEPROM and ENV_IS_IN_EEPROM can be selected independently, and > cmd/eeprom.o gets built in either case, so whether to declare the real > prototypes needs to follow the same logic as whether cmd/eeprom.c is > built. Otherwise a ENV_IS_IN_EEPROM=y, CMD_EEPROM=n build fails > > cmd/eeprom.c:73:1: error: expected identifier or ?(? before ?{? token > { > > While at it, fix the dummy replacements (at least assuming they are > meant to allow the code to compile) - they need to have the same type > as the expression they replace, or one gets errors such as > > env/eeprom.c: In function ?eeprom_bus_read?: > env/eeprom.c:37:8: error: void value not ignored as it ought to be > rcode = eeprom_read(dev_addr, offset, buffer, cnt); > > Signed-off-by: Rasmus Villemoes > Reviewed-by: Tom Rini [I had asked for a follow-up cleanup, but this is still worth taking, so...] Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: