
Dear Heiko Schocher,
In message 4DBF9760.5030607@denx.de you wrote:
--- a/common/cmd_cramfs.c +++ b/common/cmd_cramfs.c @@ -43,7 +43,9 @@ #endif
#ifdef CONFIG_CRAMFS_CMDLINE -flash_info_t flash_info[1]; +#if !defined(CONFIG_SYS_NO_FLASH) +#include <flash.h> +#endif
Do we need the #ifndef here? I don;t thik it hurts if we unconditionally #include <flash.h> ?
Yep, you are right.
But note: there was no "extern" in this declaration of flash_info[], i. e. we _did_ allocate storage here. Is the new code really equivalent? How extensively has it been tested?
flash_info is defined in the flash driver, so this is OK. It is tested on the keymile boards, and a MAKEALL runs clean.
You are probably right that the code with your patch is correct, i. e. that this one-line deletion fixes an actual bug in the existing code. But you don't mention this in the commit message.
These are two unrelated changes, that belon into separate commits.
Best regards,
Wolfgang Denk