Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp361451pxv; Wed, 14 Jul 2021 05:52:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxN4y91jHBFaIJc1j4zw+ecLRfpvc29R3XVvGYhUFEhjfdnb31r+0cqpchOIk72hMM1yjC X-Received: by 2002:aa7:dd43:: with SMTP id o3mr13385854edw.302.1626267133628; Wed, 14 Jul 2021 05:52:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626267133; cv=none; d=google.com; s=arc-20160816; b=mVVjI0XcE5QrqVC16WH2KsKESoAYPqiVBgTuF/vICDI1o2RCMSKsLFs2XTyY7Typ6t J89XOpkJqpgpKsLJdmwS2UX/QSh9eoin9NLKiH8AhEmPNdSd+sEgCWPySAk2Y21Ujoaq RUqggU6NfT+du8nMPlmDXU1TtkYjMpoSvJnz3P6rWA2q2RpW6buGnTFuvg6zndD8wfHK Mal35s266sQPbPFVyHiFAZVnlCukLQ8uccgF4ZrhHvqnu1Fyw6pJqm3amjZOuIxEe6BP E56M0x/6YKdW39/0pOnXDrDf60Cg3CuPlPSUFp5fgoLWgloGSjygDi96dUbHwzYnUQwx nGyw== 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=dPrDLNEG+J4XD9iFGAVyYkcqL2iQqKjQGuckXGis/us=; b=BdeYQ9/lQYabLKvwaLYikqFlM/HWzquk8T7VqBaGsQSNDIiR8iwmBxYGVzMckNpRfz kSAqDa7rZ1bc8gtjEZgWAyRm+S1dzDyaicz5hUNtuEO3+EM3SuOmTs9qVQAUmPkK89s/ mP56yDpfckOs7wQHD4OfvQMByZmmkOnCdHrTusRyG96SwT+XcwJzHwLG9bWW3/cbSHJQ ZMJ6s4xDIgwntRXt/j3bcQy0Nt8GNBZ0gpJfnY+v/z5cC9EunlcTOQLHkENQwNb/WAGQ YHy+OEBw/SmkWm2yd00wtJv1eeCKH2k6C4ku6bK0Vvk0A/pGlJ4QewtHECAL30eC7HjS 0DVQ== 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 a9si2623211edx.29.2021.07.14.05.51.51; Wed, 14 Jul 2021 05:52:13 -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 S239423AbhGNMxn (ORCPT + 99 others); Wed, 14 Jul 2021 08:53:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231356AbhGNMxk (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 C1485C061765 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 V0qW2500U1ccfby010qW5T; 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-0018dV-Ab; Wed, 14 Jul 2021 14:50:30 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1m3eLN-00AaEl-Sn; 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 09/10] arm64: kdump: Use IS_ENABLED(CONFIG_CRASH_DUMP) instead of #ifdef Date: Wed, 14 Jul 2021 14:50:19 +0200 Message-Id: <767e34a7ec29c417fdd5ff6e0fc76bc93d4f3c6f.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_CRASH_DUMP" by a check for "IS_ENABLED(CONFIG_CRASH_DUMP)", to increase compile coverage and to simplify the code. Signed-off-by: Geert Uytterhoeven --- v4: - New. --- arch/arm64/mm/init.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index f90ba99437c0f3c9..dc2a5b73232843e4 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -124,7 +124,6 @@ static void __init reserve_crashkernel(void) } #endif /* CONFIG_KEXEC_CORE */ -#ifdef CONFIG_CRASH_DUMP /* * reserve_elfcorehdr() - reserves memory for elf core header * @@ -135,7 +134,7 @@ static void __init reserve_crashkernel(void) */ static void __init reserve_elfcorehdr(void) { - if (!elfcorehdr_size) + if (!IS_ENABLED(CONFIG_CRASH_DUMP) || !elfcorehdr_size) return; if (memblock_is_region_reserved(elfcorehdr_addr, elfcorehdr_size)) { @@ -148,11 +147,6 @@ static void __init reserve_elfcorehdr(void) pr_info("Reserving %lldKB of memory at 0x%llx for elfcorehdr\n", elfcorehdr_size >> 10, elfcorehdr_addr); } -#else -static void __init reserve_elfcorehdr(void) -{ -} -#endif /* CONFIG_CRASH_DUMP */ /* * Return the maximum physical address for a zone accessible by the given bits -- 2.25.1