Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4558849pxj; Wed, 12 May 2021 08:10:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzT9Vns12DPnxo2G8T8gx7Z5ucABI08qptD5nn+89xh5VFmN8RgZ0iXMSVEdTUybZfOPJS8 X-Received: by 2002:a17:906:2ed0:: with SMTP id s16mr12885924eji.543.1620832257536; Wed, 12 May 2021 08:10:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620832257; cv=none; d=google.com; s=arc-20160816; b=cv09gBH/4ANBl7BCZebAlEvcMncYT2qnUSY9UWaFYlvzBraUNNbaAreaq2a9gF5/bj VR7xjQ1lL/xdAkN+9OSUxdozCrhPDuKBQkUMBCrBctJhrR0YNTqS9jcw+ZvI4OEzm9aM XCy3QWddHGX6mdtKq7Gp4E6qPin30PW731NuGM/mZHdZUHvpKNYXwaZfJ0srwRntPVgA 0IEiJpQRqB8iShofSZ6ZMGEm7DhKAh5tJXYO7HR95QxnoboUznqQVnMfXsz622XJJzTX m9ofMTqhBOOHW1aNoP0aK0wIzbKXZlmvIik6rMtdslTrnGc4k3eANe37SF/Oo9tNKWfj 9QFw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=85YhMgWHpiSl9k1oZja6e9lFc+TfPgBq1hQr0gXNZsI=; b=xDDH+TA+M8H6iEDFdcn2tFvzz7qlBOAsBaBbfSCuuocFsq+ohf0AN67mD3V4bmOPPH gh6BA4qzAZTqvx2PR5AyM16oNfZLXR8sHYcxgdUdeXQen2Dora3yv2bxbh4JW8j4kuIh XAp33VFoYvRrE4SEyEegHn7pyOgRrzC2AnZ4hPbXJJ4O+WKQqbvXg7bkRxzHXQu8PV0x Tanp+DGbYpWKTwa6xwL0YFy5QCiEs2Ley+94wHZ5Giqd8aaShoB3/KW7VeN02da4Y0MX S7SzW5KcHNHsiUxfyjShaQBt9kZEt+DZL7XdA4MQQbilSUuFprxgNC9mqflJpFYXvXZo hTyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RZjJs25Z; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e21si11709eds.204.2021.05.12.08.10.34; Wed, 12 May 2021 08:10:57 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RZjJs25Z; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233519AbhELPJp (ORCPT + 99 others); Wed, 12 May 2021 11:09:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:59082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233194AbhELPEv (ORCPT ); Wed, 12 May 2021 11:04:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EA20A61453; Wed, 12 May 2021 14:59:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620831569; bh=9Qv0i6dNsUdoHy9Gdi2rquWmUoiCWJygmlsjI0KlsuQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RZjJs25ZMYLOUJlb+eFXjsyAXUAbOAB/zEpimfCBB5GOf2SlWhq2GgQkPndnyo1Hm 5eZGzXZyRpbHZCJ3cKj+jzWNynA+s4LMezuMQd+9TELghrGBhvs3eYBJyYW3iHR0VB w2URusn+CqG16vUO07tO1wsAbgnCrFEaiTUz/vVA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Michael Ellerman , Sasha Levin Subject: [PATCH 5.4 173/244] powerpc/fadump: Mark fadump_calculate_reserve_size as __init Date: Wed, 12 May 2021 16:49:04 +0200 Message-Id: <20210512144748.538176398@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144743.039977287@linuxfoundation.org> References: <20210512144743.039977287@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor [ Upstream commit fbced1546eaaab57a32e56c974ea8acf10c6abd8 ] If fadump_calculate_reserve_size() is not inlined, there is a modpost warning: WARNING: modpost: vmlinux.o(.text+0x5196c): Section mismatch in reference from the function fadump_calculate_reserve_size() to the function .init.text:parse_crashkernel() The function fadump_calculate_reserve_size() references the function __init parse_crashkernel(). This is often because fadump_calculate_reserve_size lacks a __init annotation or the annotation of parse_crashkernel is wrong. fadump_calculate_reserve_size() calls parse_crashkernel(), which is marked as __init and fadump_calculate_reserve_size() is called from within fadump_reserve_mem(), which is also marked as __init. Mark fadump_calculate_reserve_size() as __init to fix the section mismatch. Additionally, remove the inline keyword as it is not necessary to inline this function; the compiler is still free to do so if it feels it is worthwhile since commit 889b3c1245de ("compiler: remove CONFIG_OPTIMIZE_INLINING entirely"). Fixes: 11550dc0a00b ("powerpc/fadump: reuse crashkernel parameter for fadump memory reservation") Signed-off-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://github.com/ClangBuiltLinux/linux/issues/1300 Link: https://lore.kernel.org/r/20210302195013.2626335-1-nathan@kernel.org Signed-off-by: Sasha Levin --- arch/powerpc/kernel/fadump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index 9b522152d8f0..0455dc1b2797 100644 --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c @@ -279,7 +279,7 @@ static void fadump_show_config(void) * that is required for a kernel to boot successfully. * */ -static inline u64 fadump_calculate_reserve_size(void) +static __init u64 fadump_calculate_reserve_size(void) { u64 base, size, bootmem_min; int ret; -- 2.30.2