Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4618393pxj; Wed, 12 May 2021 09:21:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2kbZt7CPW/9k7ph7MdpW+rEWoEhqo/3GFI7esgrvgEnJRt8eXRW/Q10SuhAiXkWU7qjVK X-Received: by 2002:a17:906:b7d9:: with SMTP id fy25mr20482137ejb.156.1620836464984; Wed, 12 May 2021 09:21:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620836464; cv=none; d=google.com; s=arc-20160816; b=VzKM/ni7l53yO673gjTZOre5qoOJJz4XNk8PvoPO/4B6Ph314sFjfGLzY7vOpHeO0T 8oZIOCbOPXeCjWY1GPxTILh2fLsjTX5jTL4K5M7YKSzosN6PwC+J584mawVTG4wBZjtC qYbytrlqxEBeB2JNjRNH/4ReXlhO0zCMMF9mvoIW5qgFS6qSLPctPxHDlQuJFwnxVBEj XaEf79XhpPAecBkxhZ4fRrosfgmQ2bYdtJbJXHXu8n1cNoyVlZ6hXSBxAnqpmXyUY8Zx GfjEtRIpoIeYbtbKJCuzfZIqWjDCEurogMhSj2q0M1sdXRNe73aG4LKGpKJY7V6kI8uH z1mg== 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=MUMVVEPIi+fp286GTospLVkzr/2FgApxmzMuvYmXtsY=; b=lWk6asVQaGMrI5jbhJt2PSW9wGD7WMP8JDtA6j9pWI+mSEA/GQRgjA/rDakE9jFk0B KrzoR7kDiPMbNjBwxWSlR13pA8RRcP6c2ScS2u9OeGhXWone/L6wdttPfV61AZwPUpx0 Q2IXlTxm9bsMw3qcIRyXBiLl4jqXct4LeJrQCi5sfcEPIoUnCBmZmQTyLQgJO874NdOZ jGckiSLnzcgPLV18+0yh1+A3w5RPyu0UpLZ44gwAXysScaqUdS10rTcy/7QzSAMv6AX0 iVQgcJ7W+KIeEOk6EoVOb345pcmw8g9dzGmp+RJcaklye+q2yMHkCDMsOvntwJy5S7L4 vAWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LHekS0Nc; 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 a90si57743edf.408.2021.05.12.09.20.41; Wed, 12 May 2021 09:21:04 -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=LHekS0Nc; 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 S240257AbhELQRt (ORCPT + 99 others); Wed, 12 May 2021 12:17:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:50218 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232555AbhELPeC (ORCPT ); Wed, 12 May 2021 11:34:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D325961990; Wed, 12 May 2021 15:17:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832644; bh=s7GYJLD9H2ET5g+aXU4rGsR/doxp68Fju7SWvx9sD6A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LHekS0NcMPoI8DGCtSsG2h1uGI6Bwg8fm7WbqVIcLWW7PEW+YDJPMtudwGidj/WMg I4hY1xjdzq7t7un0dPY0qdIbK71drkRXzMnzHTM6JkyNy6YtX9c9Ti+VsoA/16uZAO R7E3fXA3WqAZjszqVqp77eM4y7DO3Lcch5Sb3GcE= 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.10 363/530] powerpc/fadump: Mark fadump_calculate_reserve_size as __init Date: Wed, 12 May 2021 16:47:53 +0200 Message-Id: <20210512144831.710783583@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@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 8482739d42f3..eddf362caedc 100644 --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c @@ -292,7 +292,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