From patchwork Tue Nov 7 10:48:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 118150 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp368046edm; Tue, 7 Nov 2017 02:49:40 -0800 (PST) X-Google-Smtp-Source: ABhQp+QiU5lz28kpannb41SxBcEfMGNXrkDRS8lu9aRQssj/8UXNPyvu+xGBamy68vY5Sku4Sr1F X-Received: by 10.99.182.66 with SMTP id v2mr18816915pgt.325.1510051780580; Tue, 07 Nov 2017 02:49:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510051780; cv=none; d=google.com; s=arc-20160816; b=ZkmgzxZBXiGmLmcKhr58gJ92tJ9zlrggv3wGMiaPSEYtPejhsYl+FOzI2hazq4+ICV FJ348mVF0zkocHmg1+M95ZapfQxOTJclXVTXW+yP5BAZ11TSFhdUzCNh/YYpqrMYeROe fhKo7YTsWFmO1bGN3SPn9A54U6Hp1aRDpyTSFgGCM0t/nuN9gO//fhcgUmzpoWBBN0o3 t+joQFtk5mcIzeC0IyoHqasH9vn/kjwuLxRWIQuJN27ZN+O1F2BG68KnnhfB4yhk+Eim bqBAY6epsnwXFDBK80t0meUr4EYKx1c6sYXK4VoV2FBMCTetjI2kBKxnRQsiEt/pdu8n fu1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ACNxq3oX6mXQX6k9vOlE+y66tuIF/8mo1bE0dqmBVow=; b=SOx5xsEty+bcojA+Zc2SPUBqHw7mOpkREBRCVlrm2E9diws86dwFAitGXGdccPl2Bt JRfp1jf7emNNB46n6yXKhpkI1DNrXtNpzsPP1+yrYSfmv+soKh2eVGdzqjeq4hopbr42 ESg3QYZgQG16oiO+IHjJzsTLzqLpe36ee/Xlcl2s79YvB3ocvNacj9fIbifdTJxmLWYN 1gF69dh75/3lN3nrz3X0cPCqyazrIy7ZOSIUimabH8X0ntOYw/rsjHrGe45XMa9pwoFQ O06GCrNpvtU4B+q5s66qP4jJH30plNzzuCXx3UI46b4cX+mv7iPgFqBdgoLq5SDos2oB YiFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e26si866468pgn.162.2017.11.07.02.49.40; Tue, 07 Nov 2017 02:49:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757408AbdKGKti (ORCPT + 26 others); Tue, 7 Nov 2017 05:49:38 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:56834 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753460AbdKGKt2 (ORCPT ); Tue, 7 Nov 2017 05:49:28 -0500 Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0LfBVo-1f0WXb2wG0-00onbC; Tue, 07 Nov 2017 11:49:15 +0100 From: Arnd Bergmann To: "Rafael J. Wysocki" , Len Brown Cc: Paul Menzel , Arnd Bergmann , stable@vger.kernel.org, Jean Delvare , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ACPI / PM: fix build regression Date: Tue, 7 Nov 2017 11:48:44 +0100 Message-Id: <20171107104913.3303452-1-arnd@arndb.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O37AXdYgJ3Esag== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The XPS13 workaround caused a build regression in configurations without CONFIG_ACPI_SLEEP. drivers/acpi/sleep.c:95:5: error: redefinition of 'acpi_target_system_state' u32 acpi_target_system_state(void) ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from include/linux/acpi.h:44:0, from drivers/acpi/sleep.c:20: include/acpi/acpi_bus.h:661:19: note: previous definition of 'acpi_target_system_state' was here static inline u32 acpi_target_system_state(void) { return ACPI_STATE_S0; } ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/acpi/sleep.c:495:13: error: 'acpi_pm_end' defined but not used [-Werror=unused-function] This adds back the #ifdef checks required to make it build cleanly again. The patch that caused the regression is marked for backports to v4.13, the same should apply to this one. Fixes: 8d7a4756fef9 ("ACPI / PM: Blacklist Low Power S0 Idle _DSM for Dell XPS13 9360") Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann --- I have not tried to verify that the new version makes sense, only that it builds cleanly. Please have a look and apply either this patch, or whatever else makes more sense here. --- drivers/acpi/sleep.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.9.0 diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 01ac769e51c9..374f995dbd0a 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -90,6 +90,7 @@ static bool acpi_sleep_state_supported(u8 sleep_state) && acpi_gbl_FADT.sleep_status.address)); } +#ifdef CONFIG_ACPI_SLEEP static u32 acpi_target_sleep_state = ACPI_STATE_S0; u32 acpi_target_system_state(void) @@ -99,6 +100,7 @@ u32 acpi_target_system_state(void) EXPORT_SYMBOL_GPL(acpi_target_system_state); static bool pwr_btn_event_pending; +#endif /* * The ACPI specification wants us to save NVS memory regions during hibernation @@ -376,6 +378,7 @@ static void __init acpi_sleep_dmi_check(void) dmi_check_system(acpisleep_dmi_table); } +#ifdef CONFIG_ACPI_SLEEP /** * acpi_pm_freeze - Disable the GPEs and suspend EC transactions. */ @@ -503,6 +506,7 @@ static void acpi_pm_end(void) acpi_target_sleep_state = ACPI_STATE_S0; acpi_sleep_tts_switch(acpi_target_sleep_state); } +#endif #ifdef CONFIG_SUSPEND static u32 acpi_suspend_states[] = {