From patchwork Mon Dec 7 13:35:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 553386 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 6B3391402A9 for ; Tue, 8 Dec 2015 00:35:09 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2C4D14B6E2; Mon, 7 Dec 2015 14:35:07 +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 5EVU7oTTDEX7; Mon, 7 Dec 2015 14:35:06 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7411E4B6DB; Mon, 7 Dec 2015 14:35:06 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A46B04B6DB for ; Mon, 7 Dec 2015 14:35:02 +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 tddPcB7tSUoM for ; Mon, 7 Dec 2015 14:35:02 +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-qg0-f50.google.com (mail-qg0-f50.google.com [209.85.192.50]) by theia.denx.de (Postfix) with ESMTPS id 3F02A4B6D4 for ; Mon, 7 Dec 2015 14:34:57 +0100 (CET) Received: by qgea14 with SMTP id a14so142717942qge.0 for ; Mon, 07 Dec 2015 05:34:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:subject:date:message-id:in-reply-to:references; bh=Rf+nl44LUlJ4fZgHoSJ8uJxRzhPFakr3yluuIRCcthQ=; b=Hxvi/qkfEIu9FX1FbhfFFx/xwFklzOsuS6OJt75nZ+FEg4e8tLh9bHLxkYwF5nU+9C YmJH17K4MZ0ZsLE0/eColS+6w/TUmbQYTXs/JChlZhR7zCeJKbPGXrdr7bn9TlUWeYlo 0irsAuiFIVQ72blmtcBNumQOa7ZYctCbl4Got6dFt05h/CmwKuDiC9fqMVr9UeYCdeBE +9Yfd5E1iTfkYij6Izx4AWO67D/q327UqUcxjJkDO0gl0m8ch5S7hDd8fsuMu/4/1+Uo Rczi3UGBI7yYP0sqFEnfOwrcXAFMZkswN6mW/Y3Vgfd38ejzCEYheEVbT55P7JDCCPKT 5+gg== X-Received: by 10.140.85.50 with SMTP id m47mr36359498qgd.87.1449495296322; Mon, 07 Dec 2015 05:34:56 -0800 (PST) Received: from localhost.localdomain (cpe-75-180-230-22.ec.res.rr.com. [75.180.230.22]) by smtp.gmail.com with ESMTPSA id a19sm11580782qgf.45.2015.12.07.05.34.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Dec 2015 05:34:55 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Date: Mon, 7 Dec 2015 08:35:15 -0500 Message-Id: <1449495315-23144-1-git-send-email-trini@konsulko.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <56654F23.60602@monstr.eu> References: <56654F23.60602@monstr.eu> Subject: [U-Boot] [PATCH] CONFIG_NEEDS_MANUAL_RELOC: Fix warnings when not set X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Now that we may compile (but not link) code calling fixup_cmdtable when this is not set, we need to always have the declaration available. We should also make sure that anyone calling the function includes as that's where the function declaration is. Signed-off-by: Tom Rini --- Changes in v2: - Move declaration up to be under the current __ASSEMBLY__ test. --- common/board_r.c | 1 + include/command.h | 5 +---- test/dm/cmd_dm.c | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/common/board_r.c b/common/board_r.c index 5af32dd..75ee43e 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -15,6 +15,7 @@ #if defined(CONFIG_CMD_BEDBUG) #include #endif +#include #include #ifdef CONFIG_HAS_DATAFLASH #include diff --git a/include/command.h b/include/command.h index 6c04cd9..2ae9b6c 100644 --- a/include/command.h +++ b/include/command.h @@ -142,6 +142,7 @@ enum command_ret_t { int cmd_process(int flag, int argc, char * const argv[], int *repeatable, unsigned long *ticks); +void fixup_cmdtable(cmd_tbl_t *cmdtp, int size); #endif /* __ASSEMBLY__ */ /* @@ -179,8 +180,4 @@ int cmd_process(int flag, int argc, char * const argv[], #define U_BOOT_CMD(_name, _maxargs, _rep, _cmd, _usage, _help) \ U_BOOT_CMD_COMPLETE(_name, _maxargs, _rep, _cmd, _usage, _help, NULL) -#if defined(CONFIG_NEEDS_MANUAL_RELOC) -void fixup_cmdtable(cmd_tbl_t *cmdtp, int size); -#endif - #endif /* __COMMAND_H */ diff --git a/test/dm/cmd_dm.c b/test/dm/cmd_dm.c index b6e7109..a3c5971 100644 --- a/test/dm/cmd_dm.c +++ b/test/dm/cmd_dm.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include