From patchwork Sat Feb 9 08:05:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 2119841 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 560A2DF24C for ; Sat, 9 Feb 2013 08:09:29 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U45RB-00065W-3p; Sat, 09 Feb 2013 08:05:29 +0000 Received: from smtp35.i.mail.ru ([94.100.177.95]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U45R6-00065F-T4 for linux-arm-kernel@lists.infradead.org; Sat, 09 Feb 2013 08:05:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail; h=Message-Id:Date:Subject:Cc:To:From; bh=r7GK1fcc8ONnLlYFguRSd8KO51XXfmqmlp5F86CZ5UI=; b=X8k1MkVvUIZqCmxIu25ubM0JAw5ATScgxlaxeVBZ2B4GObiJd4a/gpb7veBTvj37gVjE2XJ8QF9cnytGW5pLY8KqdqrjoUwhIiJL6VCTJphDiOj6kZL5wOHmt5gx2vzf; Received: from [188.134.40.128] (port=26591 helo=shc.zet) by smtp35.i.mail.ru with esmtpa (envelope-from ) id 1U45R3-0001CN-6D; Sat, 09 Feb 2013 12:05:21 +0400 From: Alexander Shiyan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: Fix compiler warning when CONFIG_ATAGS is not set Date: Sat, 9 Feb 2013 12:05:10 +0400 Message-Id: <1360397110-3480-1-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 1.7.12.4 X-Spam: Not detected X-Mras: Ok X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130209_030525_360791_7EF22F7D X-CRM114-Status: UNSURE ( 9.14 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (shc_work[at]mail.ru) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Russell King , Alexander Shiyan X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch fix following compiler warning: CC arch/arm/kernel/setup.o In file included from arch/arm/kernel/setup.c:58: arch/arm/kernel/atags.h: In function 'setup_machine_tags': arch/arm/kernel/atags.h:18: warning: no return statement in function returning non-void Signed-off-by: Alexander Shiyan --- arch/arm/kernel/atags.h | 8 -------- arch/arm/kernel/setup.c | 8 +++++++- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/arch/arm/kernel/atags.h b/arch/arm/kernel/atags.h index 9edc969..9d95c77 100644 --- a/arch/arm/kernel/atags.h +++ b/arch/arm/kernel/atags.h @@ -8,12 +8,4 @@ void convert_to_tag_list(struct tag *tags); #ifdef CONFIG_ATAGS struct machine_desc *setup_machine_tags(phys_addr_t __atags_pointer, unsigned int machine_nr); -#else -static inline struct machine_desc * -setup_machine_tags(phys_addr_t __atags_pointer, unsigned int machine_nr) -{ - early_print("no ATAGS support: can't continue\n"); - while (true); - unreachable(); -} #endif diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 1cc9e17..1dcb989 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -732,8 +732,14 @@ void __init setup_arch(char **cmdline_p) setup_processor(); mdesc = setup_machine_fdt(__atags_pointer); - if (!mdesc) + if (!mdesc) { +#ifdef CONFIG_ATAGS mdesc = setup_machine_tags(__atags_pointer, __machine_arch_type); +#else + early_print("no ATAGS support: can't continue\n"); + while (1); +#endif + } machine_desc = mdesc; machine_name = mdesc->name;