From patchwork Thu Jun 1 21:33:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102204 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp629621vqr; Thu, 1 Jun 2023 14:43:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6MMOsWrAwNRJTfwpps8Kl03QJjnmAzfi6SSmSuvKtpQTw/7o1QyNM72VMSn1KFtY28WT6t X-Received: by 2002:a17:90b:364a:b0:256:6bbc:51b1 with SMTP id nh10-20020a17090b364a00b002566bbc51b1mr647803pjb.17.1685655792148; Thu, 01 Jun 2023 14:43:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685655792; cv=none; d=google.com; s=arc-20160816; b=r9T+HTszII3RyLHGKf+f+/OgeuQ4AxagNT3pS1NSbtZfnkcpRQRz6j7hPnY8IteIGV wLqjhEYWMHTY8jd2ocSoxCs0zcK0aItY0Wb9Ef80XRdN5rypMIPdNd/3MfdsJbbFgh1r NCkJwrUu18nKbaHDAatUKeVRrLDefYQ0+cQLGidzNfCmnrFN3vuDRvmSapCh/V/+82EV rayKQHrhyoSmPWys1bxi6oyp9AyS8JP6gBnER8nSKcSBoHAI8cu6Gk+2kmZLttbEpQ74 361onaJ/35liiDTDQgbIRzlFvKAoumpIfcO6w1OjZ9QxPiW8AU8hb1sHh26mAvM4sOMd i04g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=2bkojOiNUZagnf9d6mIMI/rs0GKK15WfGoMhtkFMHqM=; b=HVBJnXV8jAAKKbVSUudVxlEc5MsXGPWEGxL+1PKPD94UzNvNLWoYSYhw21peY5z+hE 9Nbu+HF99Fh1aN4QQmiarov7TSeOy4Lnq+IqoOX+FP3lVIPV7KHvcP/GjwaqQAsMleUN nuYP4EEpwdU65pGvWOSZ3OaIKiC7/bIw1Q/JdYDLtVcEXljgu+Ed7Y/xbbJtFMcY59Q8 1YS5QtfFTJbv6BB5rk4vdOL93q4PJZhDz7q6zTr7I1QIyfjrY2fbu6dPAULxdovQsHQ1 XNCbKOtdxRE78e7g+Wzppd3q3fMkOqgjcKX2kYL6m2iQocOTD4wt2cHSDit5cQ57StO8 SjiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NKehU82L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p3-20020a17090b010300b00244a45cb5c0si1676024pjz.42.2023.06.01.14.42.57; Thu, 01 Jun 2023 14:43:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NKehU82L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232596AbjFAVd2 (ORCPT + 99 others); Thu, 1 Jun 2023 17:33:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbjFAVd1 (ORCPT ); Thu, 1 Jun 2023 17:33:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B8C7184; Thu, 1 Jun 2023 14:33:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F315964A01; Thu, 1 Jun 2023 21:33:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 264F7C433EF; Thu, 1 Jun 2023 21:33:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685655205; bh=DVSNOTIP/R8bS1m5PsAZpRYvyTGEtVsJhbarVlye1+4=; h=From:To:Cc:Subject:Date:From; b=NKehU82LODJq5Rc+Sc6LvY0DuP9DeKLBNt2mw38k1N8TmlsjQ44xMIxRmAr+XswpV jVGQIylW4BpsY69NMSamJ5SpsGssiiWACFQxQBmo5tzut27bObwiyUWt71KLk6ltBC XapuXMoABWgX5G0PCFl4qIgfWm7BRdQpnBu6GW9Gv9bwFxxVLX6KPtS5/4YBZEW4iC 7X2fEYmqlGINHMGXwjeOpNGi4Ar1cF8uicLpyQ+7XXB4ES/p15eD+nVST/4nqTXGJ1 mS6oAdXHZl7a/O3LZjoabM06FCzidiFbByXxXCBeSgu5ANY4Wwvl5bt9oAaqQXbdFo fl5i1qo8Q4URg== From: Arnd Bergmann To: "Rafael J. Wysocki" Cc: Arnd Bergmann , Len Brown , Manyi Li , Juergen Gross , Dave Hansen , Simon Gaiser , Kai-Heng Feng , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ACPI: s2idle: fix section mismatch warning Date: Thu, 1 Jun 2023 23:33:15 +0200 Message-Id: <20230601213319.3304080-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767538208264392040?= X-GMAIL-MSGID: =?utf-8?q?1767538208264392040?= From: Arnd Bergmann The acpi_sleep_suspend_setup() function is missing an __init annotation, which causes a warning in rare configurations that end up not inlining it into its caller: WARNING: modpost: vmlinux.o: section mismatch in reference: acpi_sleep_suspend_setup (section: .text) -> acpi_s2idle_setup (section: .init.text) It's only called from an __init function, so adding the annotation is correct here. Signed-off-by: Arnd Bergmann --- drivers/acpi/sleep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 72470b9f16c45..552adc04743b5 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -840,7 +840,7 @@ void __weak acpi_s2idle_setup(void) s2idle_set_ops(&acpi_s2idle_ops); } -static void acpi_sleep_suspend_setup(void) +static void __init acpi_sleep_suspend_setup(void) { bool suspend_ops_needed = false; int i;