public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Remove entirely superfluous preprocessor tests from cmd_*.c files.
@ 2009-11-19 12:10 Robert P. J. Day
  2009-11-19 15:36 ` Peter Tyser
  0 siblings, 1 reply; 3+ messages in thread
From: Robert P. J. Day @ 2009-11-19 12:10 UTC (permalink / raw)
  To: u-boot


A small number of common/cmd_*.c files contain preprocessor tests that
are apparently superfluous since those same tests are used in the
Makefile to control the compilation of those files.  Those tests are
clearly redundant as long as they surround the entirety of the source
in those files.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

---

  based on simple visual inspection, i can't see how those tests could
make any difference so they might as well be tossed.

diff --git a/common/cmd_cache.c b/common/cmd_cache.c
index 0dfa336..1202258 100644
--- a/common/cmd_cache.c
+++ b/common/cmd_cache.c
@@ -27,8 +27,6 @@
 #include <common.h>
 #include <command.h>

-#if defined(CONFIG_CMD_CACHE)
-
 static int on_off (const char *);

 int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
@@ -108,5 +106,3 @@ U_BOOT_CMD(
 	"[on, off]\n"
 	"    - enable or disable data (writethrough) cache"
 );
-
-#endif
diff --git a/common/cmd_license.c b/common/cmd_license.c
index 141215b..c6f272a 100644
--- a/common/cmd_license.c
+++ b/common/cmd_license.c
@@ -23,8 +23,6 @@

 #include <common.h>

-#if defined(CONFIG_CMD_LICENSE)
-
 /* COPYING is currently 15951 bytes in size */
 #define LICENSE_MAX	20480

@@ -56,5 +54,3 @@ U_BOOT_CMD(license, 1, 1, do_license,
 	"print GPL license text",
 	""
 );
-
-#endif /* CONFIG_CMD_LICENSE */
diff --git a/common/cmd_mgdisk.c b/common/cmd_mgdisk.c
index aadc335..3ba62f6 100644
--- a/common/cmd_mgdisk.c
+++ b/common/cmd_mgdisk.c
@@ -24,8 +24,6 @@
 #include <common.h>
 #include <command.h>

-#if defined (CONFIG_CMD_MG_DISK)
-
 #include <mg_disk.h>

 int do_mg_disk_cmd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
@@ -72,5 +70,3 @@ U_BOOT_CMD(
 	"    - sector read : mgd readsec [sector] [to] [counts]\n"
 	"    - sector write : mgd writesec [from] [sector] [counts]"
 );
-
-#endif

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

            Linux Consulting, Training and Kernel Pedantry.

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] Remove entirely superfluous preprocessor tests from cmd_*.c files.
  2009-11-19 12:10 [U-Boot] [PATCH] Remove entirely superfluous preprocessor tests from cmd_*.c files Robert P. J. Day
@ 2009-11-19 15:36 ` Peter Tyser
  2009-11-19 15:57   ` Robert P. J. Day
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Tyser @ 2009-11-19 15:36 UTC (permalink / raw)
  To: u-boot


> -#if defined(CONFIG_CMD_LICENSE)
> -
>  /* COPYING is currently 15951 bytes in size */
>  #define LICENSE_MAX	20480
> 
> @@ -56,5 +54,3 @@ U_BOOT_CMD(license, 1, 1, do_license,
>  	"print GPL license text",
>  	""
>  );
> -
> -#endif /* CONFIG_CMD_LICENSE */

Hi Robert,
Thanks for the cleanup.  The above change was recently submitted, but
hasn't been applied yet.  Search for "cmd_license: Remove unneeded
#ifdef CONFIG_CMD_LICENSE".  Could you remove the above chunk from your
patch and resubmit so as to prevent a conflict when Wolfgang applies
both patches?

Best,
Peter

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] Remove entirely superfluous preprocessor tests from cmd_*.c files.
  2009-11-19 15:36 ` Peter Tyser
@ 2009-11-19 15:57   ` Robert P. J. Day
  0 siblings, 0 replies; 3+ messages in thread
From: Robert P. J. Day @ 2009-11-19 15:57 UTC (permalink / raw)
  To: u-boot

On Thu, 19 Nov 2009, Peter Tyser wrote:

>
> > -#if defined(CONFIG_CMD_LICENSE)
> > -
> >  /* COPYING is currently 15951 bytes in size */
> >  #define LICENSE_MAX	20480
> >
> > @@ -56,5 +54,3 @@ U_BOOT_CMD(license, 1, 1, do_license,
> >  	"print GPL license text",
> >  	""
> >  );
> > -
> > -#endif /* CONFIG_CMD_LICENSE */
>
> Hi Robert,
> Thanks for the cleanup.  The above change was recently submitted, but
> hasn't been applied yet.  Search for "cmd_license: Remove unneeded
> #ifdef CONFIG_CMD_LICENSE".  Could you remove the above chunk from your
> patch and resubmit so as to prevent a conflict when Wolfgang applies
> both patches?

  okey dokey, coming right up.

rday
--

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

            Linux Consulting, Training and Kernel Pedantry.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-11-19 15:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-19 12:10 [U-Boot] [PATCH] Remove entirely superfluous preprocessor tests from cmd_*.c files Robert P. J. Day
2009-11-19 15:36 ` Peter Tyser
2009-11-19 15:57   ` Robert P. J. Day

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox