[U-Boot] [PATCH 17/30] cramfs: make cramfs usable without a NOR flash

Wolfgang Denk
2011-05-03T11:48:57Z

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

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Presidency: The greased pig in the field game of American politics.
- Ambrose Bierce