1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-27 08:33:10 +01:00

image: Drop #ifdefs for fit_print_contents()

Use a simple return to drop the unwanted code.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2021-09-25 19:43:34 -06:00
committed by Tom Rini
parent 13c133b995
commit 78740bcce8

View File

@@ -170,7 +170,6 @@ int fit_get_subimage_count(const void *fit, int images_noffset)
return count; return count;
} }
#if CONFIG_IS_ENABLED(FIT_PRINT)
/** /**
* fit_image_print_data() - prints out the hash node details * fit_image_print_data() - prints out the hash node details
* @fit: pointer to the FIT format image header * @fit: pointer to the FIT format image header
@@ -380,6 +379,9 @@ void fit_print_contents(const void *fit)
const char *p; const char *p;
time_t timestamp; time_t timestamp;
if (!CONFIG_IS_ENABLED(FIT_PRINT))
return;
/* Indent string is defined in header image.h */ /* Indent string is defined in header image.h */
p = IMAGE_INDENT_STRING; p = IMAGE_INDENT_STRING;
@@ -482,6 +484,9 @@ void fit_image_print(const void *fit, int image_noffset, const char *p)
int ndepth; int ndepth;
int ret; int ret;
if (!CONFIG_IS_ENABLED(FIT_PRINT))
return;
/* Mandatory properties */ /* Mandatory properties */
ret = fit_get_desc(fit, image_noffset, &desc); ret = fit_get_desc(fit, image_noffset, &desc);
printf("%s Description: ", p); 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 * fit_get_desc - get node description property