aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-09-25 19:43:34 -0600
committerTom Rini <trini@konsulko.com>2021-10-08 15:53:27 -0400
commit78740bcce87518d2c71c96e41429c4e65f516635 (patch)
treeb2e8fb396691fb183dfcf49894de9244d3006665 /common
parent13c133b995decefdc64160f1df2c58e5bf342e28 (diff)
downloadu-boot-78740bcce87518d2c71c96e41429c4e65f516635.zip
u-boot-78740bcce87518d2c71c96e41429c4e65f516635.tar.gz
u-boot-78740bcce87518d2c71c96e41429c4e65f516635.tar.bz2
image: Drop #ifdefs for fit_print_contents()
Use a simple return to drop the unwanted code. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/image-fit.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/common/image-fit.c b/common/image-fit.c
index f44f552..1e4099d 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -170,7 +170,6 @@ int fit_get_subimage_count(const void *fit, int images_noffset)
return count;
}
-#if CONFIG_IS_ENABLED(FIT_PRINT)
/**
* fit_image_print_data() - prints out the hash node details
* @fit: pointer to the FIT format image header
@@ -380,6 +379,9 @@ void fit_print_contents(const void *fit)
const char *p;
time_t timestamp;
+ if (!CONFIG_IS_ENABLED(FIT_PRINT))
+ return;
+
/* Indent string is defined in header image.h */
p = IMAGE_INDENT_STRING;
@@ -482,6 +484,9 @@ void fit_image_print(const void *fit, int image_noffset, const char *p)
int ndepth;
int ret;
+ if (!CONFIG_IS_ENABLED(FIT_PRINT))
+ return;
+
/* Mandatory properties */
ret = fit_get_desc(fit, image_noffset, &desc);
printf("%s Description: ", p);
@@ -575,10 +580,6 @@ void fit_image_print(const void *fit, int image_noffset, const char *p)
}
}
}
-#else
-void fit_print_contents(const void *fit) { }
-void fit_image_print(const void *fit, int image_noffset, const char *p) { }
-#endif /* CONFIG_IS_ENABLED(FIT_PRINT) */
/**
* fit_get_desc - get node description property