[Skiboot] [PATCH] flash: Fix compilation error

Jeremy Kerr jk at ozlabs.org
Mon Jun 29 11:37:45 AEST 2015

Hi Vasant,

> On gcc v4.9.2 we are hitting below compiliation error.
> [CC]  core/flash.o
> 	core/flash.c: In function ‘flash_find_subpartition’:
> 	core/flash.c:421:3: error: implicit declaration of function ‘ecc_buffer_size_minus_ecc’ [-Werror=implicit-function-declaration]
> 	partsize = ecc_buffer_size_minus_ecc(*total_size);
> 		      ^
> 	core/flash.c:486:4: error: implicit declaration of function ‘ecc_size’ [-Werror=implicit-function-declaration]
> 	*start += ecc_size(offset);
> 			      ^
> 	core/flash.c: In function ‘flash_load_resource’:
> 	core/flash.c:580:3: error: implicit declaration of function ‘ecc_buffer_size_check’ [-Werror=implicit-function-declaration]
> 	if (ecc_buffer_size_check(part_size)) {
> 					    ^

I think the patch itself is OK, but it's not clear how the old #include
would cause this error. The current make infrastructure builds with
-I<...>/libflash, so the current '#include <ecc.h>' would include this file.

[Also, you don't get an error about a missing include file, so the old
#include must be hitting something else]

Could you include the commit you're building from here, and check the
preprocessor output to find out which ecc.h is being included? Is there
a stale ecc.h in your tree?



More information about the Skiboot mailing list