From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kiernan Date: Wed, 18 Apr 2018 11:29:12 +0100 Subject: [U-Boot] [PATCH v1 6/8] spl: Disable printf if not required In-Reply-To: <218bc36f-d518-ba91-d480-3203f1c5ff27@ti.com> References: <1524042143-30213-1-git-send-email-alex.kiernan@gmail.com> <1524042143-30213-7-git-send-email-alex.kiernan@gmail.com> <218bc36f-d518-ba91-d480-3203f1c5ff27@ti.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Apr 18, 2018 at 10:27 AM, Jean-Jacques Hiblot wrote: > > > On 18/04/2018 11:02, Alex Kiernan wrote: >> >> Now we have a guard for printf, disable it in the build if it's not >> selected. >> >> Signed-off-by: Alex Kiernan >> --- >> >> lib/panic.c | 3 +++ >> lib/tiny-printf.c | 13 ++++++++----- >> lib/vsprintf.c | 4 +++- >> 3 files changed, 14 insertions(+), 6 deletions(-) >> >> diff --git a/lib/panic.c b/lib/panic.c >> index e2b8b74..3ca6421 100644 >> --- a/lib/panic.c >> +++ b/lib/panic.c >> @@ -37,9 +37,12 @@ void panic_str(const char *str) >> void panic(const char *fmt, ...) >> { >> +#if !(IS_ENABLED(CONFIG_SPL_BUILD) || IS_ENABLED(CONFIG_TPL_BUILD)) || \ >> + CONFIG_IS_ENABLED(PRINTF) > > Why not use only CONFIG_IS_ENABLED(PRINTF) ? > Because I don't have a CONFIG_PRINTF, only CONFIG_SPL_PRINTF/CONFIG_TPL_PRINTF, so you'd end up with it disabled. But very happy to add a CONFIG_PRINTF which is default y and would allow this to be cleaned up. -- Alex Kiernan