From patchwork Mon Dec 15 20:07:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 421671 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 8F38C1400DE for ; Tue, 16 Dec 2014 07:08:08 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5D9844BA00; Mon, 15 Dec 2014 21:08:05 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7F5pyqRm02Le; Mon, 15 Dec 2014 21:08:05 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B62A94BA0E; Mon, 15 Dec 2014 21:08:04 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E00354BA0E for ; Mon, 15 Dec 2014 21:07:59 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xLBoTF5qD4S0 for ; Mon, 15 Dec 2014 21:07:59 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by theia.denx.de (Postfix) with ESMTP id 9FEE14BA00 for ; Mon, 15 Dec 2014 21:07:55 +0100 (CET) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D3EF0209E5; Mon, 15 Dec 2014 20:07:53 +0000 (UTC) Received: from localhost (c-67-160-101-93.hsd1.wa.comcast.net [67.160.101.93]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EA121209D3; Mon, 15 Dec 2014 20:07:52 +0000 (UTC) From: Kevin Hilman To: u-boot@lists.denx.de, Simon Glass Date: Mon, 15 Dec 2014 12:07:52 -0800 Message-Id: <1418674072-15259-1-git-send-email-khilman@kernel.org> X-Mailer: git-send-email 2.1.3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cc: Tom Rini , linaro-kernel@lists.linaro.org Subject: [U-Boot] [PATCH v3] common/board_f.c: fix compile error when tracing disabled X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Kevin Hilman When CONFIG_TRACE is disabled, linking fails with: common/built-in.o:(.data.init_sequence_f+0x8): undefined reference to `trace_early_init' To fix, wrap trace init calls with #ifdef CONFIG_TRACE. While at it, remove the static inline version of the init call from trace.h as suggested by Simon Glass, since it doesnt work. Cc: Simon Glass Cc: Tom Rini Signed-off-by: Kevin Hilman Acked-by: Simon Glass --- Applies to v2015.01-rc3 v3: Actually remove the static inlines this time. :/ common/board_f.c | 2 ++ include/trace.h | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index 98c9c728ce73..cfd77f865361 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -813,7 +813,9 @@ static init_fnc_t init_sequence_f[] = { #endif setup_mon_len, setup_fdt, +#ifdef CONFIG_TRACE trace_early_init, +#endif initf_malloc, #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) /* TODO: can this go into arch_cpu_init()? */ diff --git a/include/trace.h b/include/trace.h index 871327fb358a..09a38d782fc0 100644 --- a/include/trace.h +++ b/include/trace.h @@ -89,14 +89,7 @@ int trace_list_calls(void *buff, int buff_size, unsigned int *needed); */ void trace_set_enabled(int enabled); -#ifdef CONFIG_TRACE_EARLY int trace_early_init(void); -#else -static inline int trace_early_init(void) -{ - return 0; -} -#endif /** * Init the trace system