]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
image: Remove remaining #ifdefs in image-fit.c
authorSimon Glass <sjg@chromium.org>
Wed, 8 May 2013 08:05:58 +0000 (08:05 +0000)
committerTom Rini <trini@ti.com>
Tue, 14 May 2013 19:37:25 +0000 (15:37 -0400)
There are only two left. One is unnecessary and the other can be moved
to the header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/image-fit.c
common/image.c
include/image.h

index 9516abf7055669588c2a38c3271d99d8547ae407..ec7b038dbe4b362ca86c4162fcd5537e6a9dd7f9 100644 (file)
@@ -149,11 +149,8 @@ void fit_print_contents(const void *fit)
        const char *p;
        time_t timestamp;
 
-#ifdef USE_HOSTCC
-       p = "";
-#else
-       p = "   ";
-#endif
+       /* Indent string is defined in header image.h */
+       p = IMAGE_INDENT_STRING;
 
        /* Root node properties */
        ret = fit_get_desc(fit, 0, &desc);
@@ -1463,7 +1460,6 @@ void fit_conf_print(const void *fit, int noffset, const char *p)
  *     1, on success
  *     0, on failure
  */
-#ifndef USE_HOSTCC
 int fit_check_ramdisk(const void *fit, int rd_noffset, uint8_t arch,
                        int verify)
 {
@@ -1492,4 +1488,3 @@ int fit_check_ramdisk(const void *fit, int rd_noffset, uint8_t arch,
        bootstage_mark(BOOTSTAGE_ID_FIT_RD_CHECK_ALL_OK);
        return 1;
 }
-#endif /* USE_HOSTCC */
index 564ed90ca06073a527767774afd086dc6b148248..d249758d573c3425856caa6c70679ab4a0cc3b87 100644 (file)
@@ -296,12 +296,7 @@ void image_print_contents(const void *ptr)
        const image_header_t *hdr = (const image_header_t *)ptr;
        const char *p;
 
-#ifdef USE_HOSTCC
-       p = "";
-#else
-       p = "   ";
-#endif
-
+       p = IMAGE_INDENT_STRING;
        printf("%sImage Name:   %.*s\n", p, IH_NMLEN, image_get_name(hdr));
        if (IMAGE_ENABLE_TIMESTAMP) {
                printf("%sCreated:      ", p);
index df020ff135d210677cd530f10c52e524e6bfd377..27c977e534780d0a2cfaf5bf24a17ae6993fa4a6 100644 (file)
@@ -44,6 +44,7 @@
 #define CONFIG_FIT_VERBOSE     1 /* enable fit_format_{error,warning}() */
 
 #define IMAGE_ENABLE_IGNORE    0
+#define IMAGE_INDENT_STRING    ""
 
 #else
 
@@ -53,6 +54,7 @@
 
 /* Take notice of the 'ignore' property for hashes */
 #define IMAGE_ENABLE_IGNORE    1
+#define IMAGE_INDENT_STRING    "   "
 
 #endif /* USE_HOSTCC */