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: 42290 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BFD7C26C6C for ; Mon, 15 Dec 2014 20:08:08 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id r20sf4032648wiv.1 for ; Mon, 15 Dec 2014 12:08:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:cc:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=ajx+9NsJ2tXibv3cZhWQ2yd59R4vm0ZIJT/4oShgl2c=; b=AcAfJPFruiKuEluP7ChBgVRL0PDboyT+w3jYvf0a0CGDaKxysjqTVW5Hj8zdspGuz4 +ibr9h9CyQKjDu531rVVtKOB6k4eFJLwgq3u2Y+wHWRYov40Cvk61s7A6EmijR+FLVij OUSeJS9xouc7u2mbTIXuLFBR7MMUPb6Ye3GmpxgML3P8gDWtt9nYbzOfjv6SwHNhucdV KfK3PuJvSoDqi8Fl1W63sw7NBH66V7o857n3oyllFFmlOw1BQ4elOO+NBiwf+Tcz8yJx aFOlCiTR18TB70hI0YOMmr6Qh/cY1bdcAeSRYMLqQPa/gPAfBNRn5zHdUToFurrxJju/ tKeg== X-Gm-Message-State: ALoCoQkX8LT0zuA2RaQkRpCPWycS8ftS6mwLQFuT0tvxViUwv3McZi5vpZqu5rizsRZwOz7VyN7M X-Received: by 10.194.92.34 with SMTP id cj2mr648701wjb.5.1418674087987; Mon, 15 Dec 2014 12:08:07 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.234.228 with SMTP id uh4ls807412lac.108.gmail; Mon, 15 Dec 2014 12:08:07 -0800 (PST) X-Received: by 10.152.120.167 with SMTP id ld7mr31403299lab.77.1418674087732; Mon, 15 Dec 2014 12:08:07 -0800 (PST) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id ri4si11513093lbb.25.2014.12.15.12.08.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Dec 2014 12:08:07 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by mail-lb0-f170.google.com with SMTP id 10so9875691lbg.1 for ; Mon, 15 Dec 2014 12:08:07 -0800 (PST) X-Received: by 10.152.26.201 with SMTP id n9mr25661304lag.50.1418674087416; Mon, 15 Dec 2014 12:08:07 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.142.69 with SMTP id ru5csp827477lbb; Mon, 15 Dec 2014 12:08:06 -0800 (PST) X-Received: by 10.194.20.98 with SMTP id m2mr55589562wje.52.1418674086633; Mon, 15 Dec 2014 12:08:06 -0800 (PST) Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id jp9si18624769wid.7.2014.12.15.12.08.05 for ; Mon, 15 Dec 2014 12:08:06 -0800 (PST) Received-SPF: none (google.com: u-boot-bounces@lists.denx.de does not designate permitted sender hosts) client-ip=85.214.87.163; 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: 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 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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 --- 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