Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp361430pxv; Wed, 14 Jul 2021 05:52:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8N1OPqcaYAhXls7XeOSd7CFNnI/R2J8a9ltBikOWGaA/mXFY2qs6z5ah6dcviVJ/y3rYn X-Received: by 2002:a05:6402:cab:: with SMTP id cn11mr13700656edb.308.1626267132060; Wed, 14 Jul 2021 05:52:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626267132; cv=none; d=google.com; s=arc-20160816; b=Ieu7Wg4ycB8m9dCp4gWd05jZhNm5juLnft+Vl9AWFaxfBqTh+9g0x6MOyL+R4/JAdX vCM8oH0VXwQF3WA352WtREOBeqccV6MxZEUNTQwaf0m0fXfwldnK90ZEiOQH7M4d64wS EG3p3nJtRxU2QcXxmYqWYVGV84nHjXuLWkmZy55x28J9+ShdeWObFuIURFjwe7VnQFyg copPYsbyw1kKA2Vg7ZcgIcLDZfCTrPGk3kabMEOxrUPzH9jUDmJsACL5h4WsYFmlW8mm xHGgxjS0Hj0JBfqIpAO8/8RQanODL2teuwMqEf4AMugQzqi5MPIDE3pk2I9b6HdTR668 IJFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=+n858Cg9dMtLOUuWjTT8GplFtCy8SeZF9dfoYyey+ZY=; b=SSG26ExQ0skTCCI68Ob6guSkv7SwdBrMKVym2VyhcqHJ+A0Za1pLZ8QtGnwn+DZXB9 O4V6/3UGUiOzKuhfIxwGEA130Njn2nzoX3aSXjUNrBoZPoHwE3smd/lbm4+y0QnK7O13 QIlL/gcKmE3PYLLQ9Qbq57IP2wmh+/tV2rK4kMBEt5LP/z5QDTM9OeAIsLHMSnQXyU6R p+miNbNmCdc7s3EId5cE0TwhutUhxRyLlsTLuZAg9D5ZwTr4u+z40WHWrTcqDj2tXxHY K3qGIN65Yk3BSHx58KcgQoZZKGibQ/lKtK7jTYTJgFLADhY0bVG4Etb5zbnarLBOc2k/ A8yw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ji22si2504323ejc.699.2021.07.14.05.51.48; Wed, 14 Jul 2021 05:52:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239378AbhGNMxl (ORCPT + 99 others); Wed, 14 Jul 2021 08:53:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231415AbhGNMxk (ORCPT ); Wed, 14 Jul 2021 08:53:40 -0400 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF35CC061760 for ; Wed, 14 Jul 2021 05:50:48 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed10:39cc:190a:2775:cfe7]) by xavier.telenet-ops.be with bizsmtp id V0qX250071ccfby010qX5X; Wed, 14 Jul 2021 14:50:46 +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 1m3eLO-0018dQ-SJ; Wed, 14 Jul 2021 14:50:30 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1m3eLN-00AaEJ-Q0; Wed, 14 Jul 2021 14:50:29 +0200 From: Geert Uytterhoeven To: Rob Herring , Russell King , Nicolas Pitre , Ard Biesheuvel , Linus Walleij , Catalin Marinas , Will Deacon , Nick Kossifidis , Paul Walmsley , Palmer Dabbelt , Albert Ou , Frank Rowand , Dave Young , Mike Rapoport Cc: Baoquan He , Vivek Goyal , Andrew Morton , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, kexec@lists.infradead.org, linux-mm@kvack.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v4 05/10] of: fdt: Use IS_ENABLED(CONFIG_BLK_DEV_INITRD) instead of #ifdef Date: Wed, 14 Jul 2021 14:50:15 +0200 Message-Id: <2f6ab7db7f9657b809aba7693df697c9bf9f57ae.1626266516.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 --- 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 1b4dd5418b44b9fb..a98e1bb9c84d9765 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -859,7 +859,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) { @@ -885,6 +884,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); @@ -903,11 +905,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