Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4732488pxj; Wed, 12 May 2021 11:58:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfz+pzveY2jS36C+rGEcwZYjQGbRqrWRDRHkgrqtQACdMC4gjpTsr3GKT12zNhtUN8+CZM X-Received: by 2002:aa7:db44:: with SMTP id n4mr586026edt.374.1620845881302; Wed, 12 May 2021 11:58:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620845881; cv=none; d=google.com; s=arc-20160816; b=1Ig2srtcImVDsYT++AfY8BIgEaLJb5YvZFLkvqGVNr3++D6h//YqQ9ZzeOMIEvm032 rPtx0AfsLUpSJYpht55CdOnMUZISLZest1gL+i3azrTlx0LnjVQfXeLetMLUB3jrkmWz EFnxxvgcVnOV6FSR6mTiFS7sqJ7g8FnBdTPdbC5K/NBPscqKcUwKVh5tVRByC3tGUTGL U2gUcfzGEHnqzo48hDMJYkBmJwtWhOq57neRme0fKUUbCibEraRr1W3FZ/nu5ShBjwy7 gVcDDgVSUCrytjNmrjq0tNbBcVzdGgs4xzmWy+ZK4DSXb5Qb2PoquOVgR42QwvxMTQR3 snsQ== 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=FSdXeHAYfEqboKWbXMm9uqiHY7sLOLLnov8l9WyVNLk=; b=wNhtQ2uFLQc8EE7DuA15SnXRVgnaRH+j/MojEGD9IVtW7QD1uJ9TEYfJ/FAWNJxE63 lYQ7E186V/rqKLSnUDK1iJRRHb3tQ/QYkVw25MzFcqsnVm2xFa3SONODWeQLR9l99Wkg RenNPT/jmXSWkS0qYijVn9SMpnTJC7Zu508tP5boDILerkgjZ+2IsGwiMQnmKq4nNgNk NyDW5YFCp7QoFwYdXaX5f5QBcvl/4ZWk8dyZ4s2mHqhIgUnzDZyhbyUTc1Byxgoegyfs 1YqJkLbvHdPWsTdVFUtd0Bl0Sl8KGV1woPIvLOzILFKcuSuNm0YvM9I/VpmFCUm31peE jX4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Jw6+KjdV; 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 s15si671079eji.457.2021.05.12.11.57.37; Wed, 12 May 2021 11:58:01 -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=Jw6+KjdV; 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 S1359614AbhELSxe (ORCPT + 99 others); Wed, 12 May 2021 14:53:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:35726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243965AbhELQmU (ORCPT ); Wed, 12 May 2021 12:42:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A764261C4B; Wed, 12 May 2021 16:08:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620835729; bh=aEPcKNMPP9AEd2JBI5hjc1BqB8RVtgY5vmsY8YPuXAM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jw6+KjdViWL3vbsMSGDMh9+ZaQrlSH+YTCCG9S8QhE25U8kxQn2HjBxdQECaZzb+r 8oMgYwahV6IsOfpcckc//8fJ4OxQHzTWZ3NMeOflhQY95ixKyBUrvV2wQWXKJO8sT+ Ax2QEBED5hXrA9X3p16bu3KmlFo68jHxmKhsHdSQ= 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.12 462/677] powerpc/prom: Mark identical_pvr_fixup as __init Date: Wed, 12 May 2021 16:48:28 +0200 Message-Id: <20210512144852.711879763@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144837.204217980@linuxfoundation.org> References: <20210512144837.204217980@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 9a4797d1d40d..a8b2d6bfc1ca 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -267,7 +267,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