[U-Boot-Users] [PATCH] docecc.c include line

The file common/docecc.c includes linux/mtd/doc2000.h prior to checking if CFG_CMD_DOC is used. This defines SECTORSIZE, ADDR_COLUMN, etc that is also being defined by various include/configs/* files for use with NAND. This causes an annoying compiler warning due to redefinition.
Attached patch moves the #include line until after the check for CFG_CMD_DOC to prevent warning message.
* Patch by Dan Eisenhut, 01 Jul 2004: Moved docecc.c include line to prevent compiler warning on some boards.
Probably a bigger issue here with conflicting macro variables, just no one has used CMD_DOC and CMD_NAND at the same time yet.

In message 77FE4A1FA59FF947845A42194AD6676202E31083@uswaumsx07medge.med.ge.com you wrote:
The file common/docecc.c includes linux/mtd/doc2000.h prior to checking if CFG_CMD_DOC is used. This defines SECTORSIZE, ADDR_COLUMN, etc that is also being defined by various include/configs/* files for use with NAND. This causes an annoying compiler warning due to redefinition.
Attached patch moves the #include line until after the check for CFG_CMD_DOC to prevent warning message.
- Patch by Dan Eisenhut, 01 Jul 2004: Moved docecc.c include line to prevent compiler warning on some boards.
Added, thanks.
Probably a bigger issue here with conflicting macro variables, just no one has used CMD_DOC and CMD_NAND at the same time yet.
Probably. Well, the first one will have to fix any existing problems, then.
Best regards,
Wolfgang Denk
participants (2)
-
Eisenhut, Daniel (MED)
-
Wolfgang Denk