Skip to contentSkip to conversation

Move preprocessor test for cmd_nand.c to Makefile

PATCH New Robert P. J. Day 3 participants 3 messages Nov 19, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Move preprocessor test for cmd_nand.c to Makefile

Move the CONFIG_CMD_NAND preprocessor test out of common/cmd_nand.c and into the Makefile for consistency with other commands.

---

AFAICT, this doesn't affect any functionality, right?

common/Makefile +1 -1
index 3781738..b8c596c 100644
@@ -116,7 +116,7 @@ COBJS-$(CONFIG_CMD_MISC) += cmd_misc.o
 COBJS-$(CONFIG_CMD_MMC) += cmd_mmc.o
 COBJS-$(CONFIG_MP) += cmd_mp.o
 COBJS-$(CONFIG_CMD_MTDPARTS) += cmd_mtdparts.o
-COBJS-y += cmd_nand.o
+COBJS-$(CONFIG_CMD_NAND) += cmd_nand.o
 COBJS-$(CONFIG_CMD_NET) += cmd_net.o
 COBJS-$(CONFIG_CMD_ONENAND) += cmd_onenand.o
 COBJS-$(CONFIG_CMD_OTP) += cmd_otp.o
common/cmd_nand.c +0 -3
index 158a55f..1b17159 100644
@@ -19,8 +19,6 @@
 #include <common.h>
 #include <linux/mtd/mtd.h>
 
-#if defined(CONFIG_CMD_NAND)
-
 #include <command.h>
 #include <watchdog.h>
 #include <malloc.h>
@@ -686,4 +684,3 @@ U_BOOT_CMD(nboot, 4, 1, do_nandboot,
 	"boot from NAND device",
 	"[partition] | [[[loadAddr] dev] offset]"
 );
-#endif

========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA

Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday

========================================================================

#1 lore raw

PATCH 1/1 Move preprocessor test for cmd_nand.c to Makefile

Quoted 2 lines · Robert P. J. Day

Move the CONFIG_CMD_NAND preprocessor test out of common/cmd_nand.c and into the Makefile for consistency with other commands.

This change has already been submitted by 2 different people and I believe is in the u-boot-nand-flash/next tree.

Best,
Peter

#2 lore raw

PATCH 1/1 Move preprocessor test for cmd_nand.c to Makefile

Quoted 6 lines · Peter Tyser
Quoted 2 lines · Robert P. J. Day

Move the CONFIG_CMD_NAND preprocessor test out of common/cmd_nand.c and into the Makefile for consistency with other commands.

This change has already been submitted by 2 different people and I believe is in the u-boot-nand-flash/next tree.

It's in Wolfgang's next tree now.

-Scott