From 4f1eed7527e256edd10fab85d2651a35e530509f Mon Sep 17 00:00:00 2001 From: Alex Kiernan Date: Thu, 19 Apr 2018 04:32:55 +0000 Subject: spl: Disable printf if not required Now we have a guard for printf, disable it in the build if it's not selected. Signed-off-by: Alex Kiernan --- lib/tiny-printf.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/tiny-printf.c') diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c index 0b04813dc20..e29377e0004 100644 --- a/lib/tiny-printf.c +++ b/lib/tiny-printf.c @@ -23,11 +23,6 @@ struct printf_info { void (*putc)(struct printf_info *info, char ch); }; -static void putc_normal(struct printf_info *info, char ch) -{ - putc(ch); -} - static void out(struct printf_info *info, char c) { *info->bf++ = c; @@ -321,6 +316,12 @@ abort: return 0; } +#if CONFIG_IS_ENABLED(PRINTF) +static void putc_normal(struct printf_info *info, char ch) +{ + putc(ch); +} + int vprintf(const char *fmt, va_list va) { struct printf_info info; @@ -343,6 +344,7 @@ int printf(const char *fmt, ...) return ret; } +#endif static void putc_outstr(struct printf_info *info, char ch) { -- cgit v1.2.3