image: Tidy up fit_unsupported_reset()
authorSimon Glass <sjg@chromium.org>
Sun, 26 Sep 2021 01:43:32 +0000 (19:43 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 8 Oct 2021 19:53:27 +0000 (15:53 -0400)
This function is only used in one place and does not need to use the
preprocessor. Move it to the C file and convert it to a normal function.

Drop fit_unsupported() since it is not used.

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

index d635037..39623f9 100644 (file)
@@ -58,6 +58,14 @@ static void copy_args(char *dest, int argc, char *const argv[], char delim)
 }
 #endif
 
+static void __maybe_unused fit_unsupported_reset(const char *msg)
+{
+       if (CONFIG_IS_ENABLED(FIT_VERBOSE)) {
+               printf("! FIT images not supported for '%s' - must reset board to recover!\n",
+                      msg);
+       }
+}
+
 #ifdef CONFIG_BOOTM_NETBSD
 static int do_bootm_netbsd(int flag, int argc, char *const argv[],
                           bootm_headers_t *images)
index a236180..e397da8 100644 (file)
@@ -1433,19 +1433,6 @@ int fit_image_cipher_get_algo(const void *fit, int noffset, char **algo);
 
 struct cipher_algo *image_get_cipher_algo(const char *full_name);
 
-#if CONFIG_IS_ENABLED(FIT_VERBOSE)
-#define fit_unsupported(msg)   printf("! %s:%d " \
-                               "FIT images not supported for '%s'\n", \
-                               __FILE__, __LINE__, (msg))
-
-#define fit_unsupported_reset(msg)     printf("! %s:%d " \
-                               "FIT images not supported for '%s' " \
-                               "- must reset board to recover!\n", \
-                               __FILE__, __LINE__, (msg))
-#else
-#define fit_unsupported(msg)
-#define fit_unsupported_reset(msg)
-#endif /* FIT_VERBOSE */
 #endif /* CONFIG_FIT */
 
 #if !defined(USE_HOSTCC)