Received: by 10.223.176.5 with SMTP id f5csp1293842wra; Fri, 2 Feb 2018 14:54:07 -0800 (PST) X-Google-Smtp-Source: AH8x227tDFNHPjgQxzLeGR3+LtNCRdxuB/IfkFc28GP2pOqn5PZeoEeANeuMWUuh3yGGCljD/X/e X-Received: by 10.99.123.92 with SMTP id k28mr529218pgn.71.1517612046984; Fri, 02 Feb 2018 14:54:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517612046; cv=none; d=google.com; s=arc-20160816; b=IZ/i2j2CFtu4wEcDzWAVFHrCQsp3v8d6HoHrxb8sgcnscfBgqQehyoaCqX2miTtVGL F1U8DkjQ+Xyvk9YBoo3fvXSy199hNAesyBXyM/4N4l3fiUm15FARtJCdjPIbzdtEvN0A CTM8S5FtV3Su2NayvbA+T1jVac5G5Ost2kz6xnMnNWQqFyCTxRJx6j/RRQ+l/6M1iTUk 0cV0cQMyzptsI5CLOdTbKfkW4N0p6kGzzZ1WlQe4ubx/Wgl30vnH2FrNskRAT2EjugPZ dnlCQEUKw7/X6R+9iJublfXIcu68WRYgvxattDzURcbuS6MgrV5AQedEYtxPc0PYUbE7 iSNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=ZQJjTRJ7aQIt1XK8u5/ykqbYECVnBphyMJD+eCcR8bk=; b=WM24wlFP/u7PJkUgFak7q3bkbL3iyZG8rqjj2esdWr7vCfiZXoUpgT86D+veUYUKgo m8vYfUwmdKyqKCdzSrdN75Cy8cXi8ZKHJdZhTd88+3+TTvYHruzoQDwCvQjY9FkLj89A 2Fe7cXkKSaONPuWuco6iDwmQt+YfnEdpd7we8qkEAaE0baVLrqQVettHSnOWKsbfst1S pqH6z2KEvaynDebHr5Br7x/cLaXLLHAOxf4qb2mMaxLYEr+oVdHsz2hliNkRuwZx+a1g rbruBGNwYMtPj0sNQc4Mbu/+XxHFaobGULeL8ex7jKz4UcwfamMubDlZiFp6WQXbGnbm GgAQ== 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 n128si2063809pgn.247.2018.02.02.14.53.45; Fri, 02 Feb 2018 14:54:06 -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 S1751968AbeBBWjn (ORCPT + 99 others); Fri, 2 Feb 2018 17:39:43 -0500 Received: from terminus.zytor.com ([65.50.211.136]:37535 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751582AbeBBWjh (ORCPT ); Fri, 2 Feb 2018 17:39:37 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w12MbHla013033; Fri, 2 Feb 2018 14:37:17 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w12MbFBr013026; Fri, 2 Feb 2018 14:37:15 -0800 Date: Fri, 2 Feb 2018 14:37:15 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Arnd Bergmann Message-ID: Cc: len.brown@intel.com, hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, arnd@arndb.de, rjw@rjwysocki.net, nico@linaro.org, ak@linux.intel.com, bart.vanassche@wdc.com, mingo@kernel.org, pavel@ucw.cz Reply-To: pavel@ucw.cz, mingo@kernel.org, ak@linux.intel.com, nico@linaro.org, bart.vanassche@wdc.com, rjw@rjwysocki.net, len.brown@intel.com, hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, arnd@arndb.de In-Reply-To: <20180202145634.200291-2-arnd@arndb.de> References: <20180202145634.200291-2-arnd@arndb.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/power: Fix swsusp_arch_resume prototype Git-Commit-ID: 328008a72d38b5bde6491e463405c34a81a65d3e X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 328008a72d38b5bde6491e463405c34a81a65d3e Gitweb: https://git.kernel.org/tip/328008a72d38b5bde6491e463405c34a81a65d3e Author: Arnd Bergmann AuthorDate: Fri, 2 Feb 2018 15:56:18 +0100 Committer: Thomas Gleixner CommitDate: Fri, 2 Feb 2018 23:33:50 +0100 x86/power: Fix swsusp_arch_resume prototype The declaration for swsusp_arch_resume marks it as 'asmlinkage', but the definition in x86-32 does not, and it fails to include the header with the declaration. This leads to a warning when building with link-time-optimizations: kernel/power/power.h:108:23: error: type of 'swsusp_arch_resume' does not match original declaration [-Werror=lto-type-mismatch] extern asmlinkage int swsusp_arch_resume(void); ^ arch/x86/power/hibernate_32.c:148:0: note: 'swsusp_arch_resume' was previously declared here int swsusp_arch_resume(void) This moves the declaration into a globally visible header file and fixes up both x86 definitions to match it. Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Cc: Len Brown Cc: Andi Kleen Cc: Nicolas Pitre Cc: linux-pm@vger.kernel.org Cc: "Rafael J. Wysocki" Cc: Pavel Machek Cc: Bart Van Assche Link: https://lkml.kernel.org/r/20180202145634.200291-2-arnd@arndb.de --- arch/x86/power/hibernate_32.c | 2 +- arch/x86/power/hibernate_64.c | 2 +- include/linux/suspend.h | 2 ++ kernel/power/power.h | 3 --- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/x86/power/hibernate_32.c b/arch/x86/power/hibernate_32.c index c35fdb5..afc4ed7 100644 --- a/arch/x86/power/hibernate_32.c +++ b/arch/x86/power/hibernate_32.c @@ -145,7 +145,7 @@ static inline void resume_init_first_level_page_table(pgd_t *pg_dir) #endif } -int swsusp_arch_resume(void) +asmlinkage int swsusp_arch_resume(void) { int error; diff --git a/arch/x86/power/hibernate_64.c b/arch/x86/power/hibernate_64.c index f910c51..0ef5e520 100644 --- a/arch/x86/power/hibernate_64.c +++ b/arch/x86/power/hibernate_64.c @@ -174,7 +174,7 @@ out: return 0; } -int swsusp_arch_resume(void) +asmlinkage int swsusp_arch_resume(void) { int error; diff --git a/include/linux/suspend.h b/include/linux/suspend.h index cc22a24..440b62f 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -384,6 +384,8 @@ extern int swsusp_page_is_forbidden(struct page *); extern void swsusp_set_page_free(struct page *); extern void swsusp_unset_page_free(struct page *); extern unsigned long get_safe_page(gfp_t gfp_mask); +extern asmlinkage int swsusp_arch_suspend(void); +extern asmlinkage int swsusp_arch_resume(void); extern void hibernation_set_ops(const struct platform_hibernation_ops *ops); extern int hibernate(void); diff --git a/kernel/power/power.h b/kernel/power/power.h index f29cd17..9e58bdc 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h @@ -104,9 +104,6 @@ extern int in_suspend; extern dev_t swsusp_resume_device; extern sector_t swsusp_resume_block; -extern asmlinkage int swsusp_arch_suspend(void); -extern asmlinkage int swsusp_arch_resume(void); - extern int create_basic_memory_bitmaps(void); extern void free_basic_memory_bitmaps(void); extern int hibernate_preallocate_memory(void);