Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp450904pxj; Thu, 20 May 2021 13:14:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9NhbGvLOTrQWxdYKi9hM0njKijL+FN6DjK3kF2eIX6bOUTHHmQV+oVNuVKuZlSVSWbU+y X-Received: by 2002:a05:6e02:1aaa:: with SMTP id l10mr7863071ilv.29.1621541677608; Thu, 20 May 2021 13:14:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621541677; cv=none; d=google.com; s=arc-20160816; b=u9yGiXFx7/ULZDG9jda/tDz9kdCQPBixoKaDAt0jjF4jwzDR/TGOvhVYAzvOWKsEwn ThZee8EjJK1j7nZT1gXZ1JwTW/Eko0qTdqG800CNP5vHPL5L07UQIVdEEHXrX3hUIV1Y 0wFYODhzKBiHlmGuOBzgBXV6O2f5rvfXplGlGExtbvZhfZqWUJHmNZDE5lWjCKL6zoJg Z1+pz1Rk4DNeH/MzR8sHrTPaAfWYItC+uZRYmS9V1afyfjPnOOQhV56ptERJVSodSk2E sA/FtSo2weIw1HfZg+EP6R0XuOvb2ZGmbfv9oYRQFvqfFs1v3N6IZb2Nf+Gjhz5iHFzH 47tw== 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=04cbVhJVOdBXsvZjU0VJRWQc/jRiyId8DPFvb+uUPYo=; b=bL44EEAdUHX+alfHib060t5h1leWjUPQKkPKKUfUukWPXp2ALGaX23vo9wFJ8UNapF zpqNPJ6cP+Ui9s4/TpkP0g7dLmp5+WBSD0t9nMCRGbbU9wH92SB5BcJRUQGrFI+mPrO8 a6jhDZhJnFWSnvCQtTtigVckicfhFzPx7SlB2bn6JQF67iDlgLPGktbp80uviaobkRxP /j6ozY5pwiJHw96/jGOKyyQl2NJE7lzBjouqdMhdjudk3sQr+wDD+N4+UAYWaNgXiXjx xPiOQtBD/xi9ur5C6vv0lt5V44mJC9mCjOLWQeKxgSqsBVBknUOAq7hBURKa5QSnI75z Msrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gjCZu+ep; 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 h19si3523636iow.36.2021.05.20.13.14.24; Thu, 20 May 2021 13:14:37 -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=gjCZu+ep; 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 S238353AbhETKr2 (ORCPT + 99 others); Thu, 20 May 2021 06:47:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:60472 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237077AbhETKbk (ORCPT ); Thu, 20 May 2021 06:31:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 091B261C41; Thu, 20 May 2021 09:52:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504336; bh=sN7CZz3fyDCAITyI9xonr0ZopyfhEPkXWlY8M6AYkaw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gjCZu+ep7YcI9ZZ79n3Shvb7hYuZmH8pns9rpK+dxafhZhl5PCxaoVsPB5MwlE2G9 9WmKAjR+DoqJogGJhxJOEuNkGkFTsjSJC+HniMRBxWojBVK97FURv8ScbyEOkk0ggl pS6CLV+myKcxjTBSIRb4Ot3tNejFce/u/Hvx6ztU= 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 4.14 198/323] powerpc/prom: Mark identical_pvr_fixup as __init Date: Thu, 20 May 2021 11:21:30 +0200 Message-Id: <20210520092126.905755708@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092120.115153432@linuxfoundation.org> References: <20210520092120.115153432@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 1ef1dd9c7ed27b080445e1576e8a05957e0e4dfc ] If identical_pvr_fixup() is not inlined, there are two modpost warnings: WARNING: modpost: vmlinux.o(.text+0x54e8): Section mismatch in reference from the function identical_pvr_fixup() to the function .init.text:of_get_flat_dt_prop() The function identical_pvr_fixup() references the function __init of_get_flat_dt_prop(). This is often because identical_pvr_fixup lacks a __init annotation or the annotation of of_get_flat_dt_prop is wrong. WARNING: modpost: vmlinux.o(.text+0x551c): Section mismatch in reference from the function identical_pvr_fixup() to the function .init.text:identify_cpu() The function identical_pvr_fixup() references the function __init identify_cpu(). This is often because identical_pvr_fixup lacks a __init annotation or the annotation of identify_cpu is wrong. identical_pvr_fixup() calls two functions marked as __init and is only called by a function marked as __init so it should be marked as __init as well. At the same time, remove the inline keywork 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: 14b3d926a22b ("[POWERPC] 4xx: update 440EP(x)/440GR(x) identical PVR issue workaround") Signed-off-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://github.com/ClangBuiltLinux/linux/issues/1316 Link: https://lore.kernel.org/r/20210302200829.2680663-1-nathan@kernel.org Signed-off-by: Sasha Levin --- arch/powerpc/kernel/prom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index bbe9c57dd1a3..99409d0420d2 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -265,7 +265,7 @@ static struct feature_property { }; #if defined(CONFIG_44x) && defined(CONFIG_PPC_FPU) -static inline void identical_pvr_fixup(unsigned long node) +static __init void identical_pvr_fixup(unsigned long node) { unsigned int pvr; const char *model = of_get_flat_dt_prop(node, "model", NULL); -- 2.30.2