From patchwork Mon Sep 27 14:19:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12520057 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3305C433EF for ; Mon, 27 Sep 2021 14:19:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AE91760EC0 for ; Mon, 27 Sep 2021 14:19:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234679AbhI0OVE (ORCPT ); Mon, 27 Sep 2021 10:21:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:33146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234763AbhI0OVD (ORCPT ); Mon, 27 Sep 2021 10:21:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0F24060F46; Mon, 27 Sep 2021 14:19:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632752366; bh=5kMOQOUkx1xtG9jmMqZdHT5odd4WM6bFcjvYnw7ZgQc=; h=From:To:Cc:Subject:Date:From; b=WbHPGtF3SakJPF5u2KRwcuzkmC0EQhIjo4OVMzQocu1T46FIshSgwoc5TiLffiJj0 y+TdOq+FeXK1bij8WvQC4Gb64kJoixYkN8uHvXSdkAxImsxiXERQWU+gxcd0rqTwQv WCNJd7CKr9c+oCrw8rvTE/PLwIXzmCgymqbR1OyCLoyhA+XcEF4u2oFvHkR/Bv703B +IkAp7SlLNipT22bLkE4ogDQasqxcadV4BuWMWSVP2iQ9g2CDxyuBG4kJe7K5e02NI DO5mmZq1nm4zF1EzcdsQlsY85n8Dl3+enEJycc/vEe6nJHMv94X2lIF3ai6IceMpgA qsHvGeFYnuXAQ== From: Arnd Bergmann To: Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , "Rafael J. Wysocki" , Len Brown Cc: Arnd Bergmann , Catalin Marinas , Marc Zyngier , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] acpi: arm64: fix section mismatch warning Date: Mon, 27 Sep 2021 16:19:14 +0200 Message-Id: <20210927141921.1760209-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Arnd Bergmann In a gcc-11 randconfig build I came across this warning: WARNING: modpost: vmlinux.o(.text.unlikely+0x2c084): Section mismatch in reference from the function next_platform_timer() to the variable .init.data:acpi_gtdt_desc The function next_platform_timer() references the variable __initdata acpi_gtdt_desc. This is often because next_platform_timer lacks a __initdata annotation or the annotation of acpi_gtdt_desc is wrong. This happens when next_platform_timer() fails to get inlined despite the inline annotation. Adding '__init' solves the issue, and it seems best to remove the 'inline' in the process seems better anyway. Signed-off-by: Arnd Bergmann --- drivers/acpi/arm64/gtdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/arm64/gtdt.c b/drivers/acpi/arm64/gtdt.c index 0a0a982f9c28..c3ad42470a7c 100644 --- a/drivers/acpi/arm64/gtdt.c +++ b/drivers/acpi/arm64/gtdt.c @@ -36,7 +36,7 @@ struct acpi_gtdt_descriptor { static struct acpi_gtdt_descriptor acpi_gtdt_desc __initdata; -static inline void *next_platform_timer(void *platform_timer) +static __init void *next_platform_timer(void *platform_timer) { struct acpi_gtdt_header *gh = platform_timer;