[U-Boot] "#if defined(CONFIG_CMD_REGINFO)" in cmd_reginfo.c redundant?
Robert P. J. Day
rpjday at crashcourse.ca
Sun Feb 3 17:51:10 CET 2013
another simple clarification -- i realize that a lot of the source
files of the form common/cmd_*.c might contain more than just the
command code, they might contain infrastructure code that's necessary
apart from the commands themselves.
but in the case of cmd_reginfo.c, this code at the very end:
#if defined(CONFIG_CMD_REGINFO)
U_BOOT_CMD(
reginfo, 2, 1, do_reginfo,
"print register information",
""
);
#endif
it seems that that preprocessor check is superfluous since the
entire file is nothing more than the implementation of the "reginfo"
command, and the relevant test is already being done in the Makefile:
COBJS-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o
am i understanding that correctly? thanks.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
More information about the U-Boot
mailing list