From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF71EC4338F for ; Wed, 11 Aug 2021 10:02:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 66AAF60F11 for ; Wed, 11 Aug 2021 10:02:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 66AAF60F11 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Gkh82dj9A4/peTWpt16N9YddLhrPErNAXbZhMfaG17I=; b=33Z8p6t/MgSgiD nRSiXp19SlO9WEwouIw+cgH2PTvay5/sDgzNVCdGJCOTdFlP7yt2PFRzAutkcaU7kEtVEut8OWGh2 h49Wk1sJ9+p9G5Q3zgsAnSzbyjT3vft76ZdR+zoABAZLyXj27FXYXu6+iRvG01fvMVNlAGx+1RHTK NlyGOJl86L7er2HP9/mGVX2ryKb70IcMG1bIYQdPopECzw9Q6z1cK2l4zG+V2ueHC3dkAy+lBl0xD KElN3eOlwpu3foWUvadbealHThZgdmkbbq4QUmG3Rq2anndHWXNXSO42rBCahCmg6adY54qRluO9o VLX3zYPKm499/ggSkAew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDl24-006UXp-UJ; Wed, 11 Aug 2021 10:00:22 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDkxF-006SOH-6u for linux-arm-kernel@bombadil.infradead.org; Wed, 11 Aug 2021 09:55:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=SjXyeDDjjVVFSdK4kOR0Z3ruJJu84SR8mUCaj+Gu1xk=; b=SIyO9C9n8J+se8dKAEGuAVjedj bGFo9M9zc9rUQkk/vg62RNGtSQR9zrXzoFHs8PmZOeTvbzskX1LRzo479aC8DB+gxaqdWiNNhY5dF noWYarY3X+4ebDq0oI0m96B3FuxXnkv2jC11e4WMKpzsSJrxCvpfY0pj25pQQojB6GvVnFJv4fMXq RzDNuLSuqT66q9be/syyidpalNH5BkOwufWAwye3RQ2wHI9RJL+WdZ/Nq16dzvB5yJ0EQ2pJvNwU1 TM4f85CgQBin57NNX1w6j1L7T6A6XnkxYPUr5WfrruamuG+O7WDtwp1lUPFaHlJ8UTEFomJlmGE7u 4qGQ5kpw==; Received: from newton.telenet-ops.be ([195.130.132.45]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDjxZ-00800v-7Q for linux-arm-kernel@lists.infradead.org; Wed, 11 Aug 2021 08:51:43 +0000 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by newton.telenet-ops.be (Postfix) with ESMTPS id 4Gl3TL6D2gzMqlKR for ; Wed, 11 Aug 2021 10:51:34 +0200 (CEST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed20:438:1ff1:1071:f524]) by baptiste.telenet-ops.be with bizsmtp id g8rG2500C1gJxCh018rG4A; Wed, 11 Aug 2021 10:51:33 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mDjxE-001yaD-6N; Wed, 11 Aug 2021 10:51:16 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1mDjxD-0058x9-D1; Wed, 11 Aug 2021 10:51:15 +0200 From: Geert Uytterhoeven To: Rob Herring , Russell King , Nicolas Pitre , Ard Biesheuvel , Linus Walleij , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Nick Kossifidis , Paul Walmsley , Palmer Dabbelt , Albert Ou , Frank Rowand , Dave Young Cc: Baoquan He , Vivek Goyal , Mike Rapoport , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, kexec@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v5 5/9] of: fdt: Use IS_ENABLED(CONFIG_BLK_DEV_INITRD) instead of #ifdef Date: Wed, 11 Aug 2021 10:51:03 +0200 Message-Id: <604c13747f09d800da6a7c12f661e1ec146f1dfd.1628670468.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210811_095137_451426_B3787EF1 X-CRM114-Status: GOOD ( 13.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Replace the conditional compilation using "#ifdef CONFIG_BLK_DEV_INITRD" by a check for "IS_ENABLED(CONFIG_BLK_DEV_INITRD)", to increase compile coverage and to simplify the code. Signed-off-by: Geert Uytterhoeven --- v5: - No changes, v4: - New. --- drivers/of/fdt.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index bc041d8141e86e62..0142b9334559baec 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -880,7 +880,6 @@ const void * __init of_flat_dt_match_machine(const void *default_match, return best_data; } -#ifdef CONFIG_BLK_DEV_INITRD static void __early_init_dt_declare_initrd(unsigned long start, unsigned long end) { @@ -906,6 +905,9 @@ static void __init early_init_dt_check_for_initrd(unsigned long node) int len; const __be32 *prop; + if (!IS_ENABLED(CONFIG_BLK_DEV_INITRD)) + return; + pr_debug("Looking for initrd properties... "); prop = of_get_flat_dt_prop(node, "linux,initrd-start", &len); @@ -924,11 +926,6 @@ static void __init early_init_dt_check_for_initrd(unsigned long node) pr_debug("initrd_start=0x%llx initrd_end=0x%llx\n", start, end); } -#else -static inline void early_init_dt_check_for_initrd(unsigned long node) -{ -} -#endif /* CONFIG_BLK_DEV_INITRD */ /** * early_init_dt_check_for_elfcorehdr - Decode elfcorehdr location from flat -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel