Skip to contentSkip to conversation

"#if defined(CONFIG_CMD_REGINFO)" in cmd_reginfo.c redundant?

U-Boot Robert P. J. Day 1 participant 1 message Feb 3, 2013

lore
Share & tools
lore
#0 lore raw

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

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================