Received: by 10.223.176.5 with SMTP id f5csp840472wra; Fri, 2 Feb 2018 07:01:15 -0800 (PST) X-Google-Smtp-Source: AH8x2250xslyBkOAl/WuyWxW2OKPJgNLitnP+nkcCVp/SSraSf8oPOc2XKOBZF2ion+espQ7LOJa X-Received: by 2002:a17:902:b28a:: with SMTP id u10-v6mr4682160plr.241.1517583675673; Fri, 02 Feb 2018 07:01:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517583675; cv=none; d=google.com; s=arc-20160816; b=kxNs3nGm2LpYvsCGrdlhu577G6tk0+/M7dmtr6ELXNECTagseFhlB2aLgEok7XsC05 fhJd1CF6iwFF2vjNxZpIml52zpAJ6w5CoLT1dH6OOtmtTL6R37c/Si0QzbZg2LxOHAkW vU7LN/2DlrUUvH0w918gCoApfSdxuE6XWS6GwwvqIz0lP1EWyH6/Y3ebwLEyPBGAVBwQ pV3PzM11Fg9uI0YftTPX4PCwdbyja76gWup5y5cwt0Oae0YWuLzmfrQ8BljXrxNkvHn6 MWqwRd/DYHgIPvoSOWBSH9YOKizUoPHeEEfKkawiIsA2ryyl/kfXZGuaE6msa60P29dK 8v7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=a4x5i9OGZNVhxHLsj7aYkwUZ8uCEWiCE0NLzShPNMy8=; b=aH/Dt//oNYZMJFopXbP6DvIjHdtxvOx4t0idfgjHuhwB28ze76RNQoZATBrXqRdc3q PfNBuvmopahi/Cp+bxa1j6l6xgA+G0pCWhaSK5q3YnYe7TOFBIP1IBq1+P2rftkt4IWV 3khqsC3GRk+mWmem+yw3sEo4m3u97WP5K2yiLoP2u7js1ooT9cpQ28zYl6y0RN6ea3L1 9ErEX3S0aZ4aP7mbPLcE6yx3jsW9ZsRlMyFydI8h79uub1+E7FM3RmX1vPzq/XSgNDYc pD5g3hIeN3uY9LAgG1yx+pr9HKB2AmDfvRZg+MvHKMX8zVekvytAbIxuSzeb9mkYdosn TA5g== 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 g1-v6si1957110plm.153.2018.02.02.07.01.00; Fri, 02 Feb 2018 07:01:15 -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 S1752280AbeBBO7C (ORCPT + 99 others); Fri, 2 Feb 2018 09:59:02 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:53657 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751795AbeBBO65 (ORCPT ); Fri, 2 Feb 2018 09:58:57 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.129]) with ESMTPA (Nemesis) id 0MeHvO-1eNB9z3uN4-00PtNS; Fri, 02 Feb 2018 15:57:38 +0100 From: Arnd Bergmann To: x86@kernel.org, "Rafael J. Wysocki" , Pavel Machek , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Len Brown Cc: Nicolas Pitre , Andi Kleen , linux-kernel@vger.kernel.org, Arnd Bergmann , Bart Van Assche , linux-pm@vger.kernel.org Subject: [PATCH 2/3] x86: fix swsusp_arch_resume prototype Date: Fri, 2 Feb 2018 15:56:18 +0100 Message-Id: <20180202145634.200291-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180202145634.200291-1-arnd@arndb.de> References: <20180202145434.100626-1-arnd@arndb.de> <20180202145634.200291-1-arnd@arndb.de> X-Provags-ID: V03:K0:ky5wMEXrnMiWObgBA5KeDBRDcJHbRB63cOR62Dk9Joh5+1tRJC5 CjM86WptwuuIxieB4rxjpSZrBk4iT9feA8Ncizh81R03TOV7sTarb2I1VubutQYQmZ/ZaPG IAXGsKFNLB1yBUkDOZbzx94RHHiX8evSkiWCUQmFW+P8BTi3ouGqkHIUbGbURli/HKwXBS6 ycE1m4L7Z1AQKdtC6kcrw== X-UI-Out-Filterresults: notjunk:1;V01:K0:SOG8ZtnVteE=:N2Ou79kS+dqCc0gWQYsaDU XKvkJH98YLzjTmVW5Ed5hIFcSWwyVZRIeYbhupqeEJUsgclX0zbqT8GxEB8gj+QaU4KTu47Nb vFO9yGVJToocmhXNlX4kNsAHjnWEpTK7S1ssF/hQeZufRDQWlWWEMaJlKfnrouVHulRzXDJxq 6+ZdM1OrOZ0kaVrPPAGqWtD3dp4DE2w0jD6KQ1JzSeaTIX5XgmztKTWJRjMGOwsmI+AYvM4xf pJNFQjWAAXckblzYf6wXFo5lnhqELhvnxJHeM0+ApJlYp4dW3iugB523KBDObmz/Mo9d2O5dZ vl4zH/kTRBRvBhqFk6Libwz5GIYwWHgfiZO6aIgFxALqiZ0vUNYmCWIt6PFcSQiRGoISzmxTL PvRNntWbUrDaHbnimh1LorNjS50190WtaM1+RBpuL9U8GKbkmcjU3pntzq9om+fKvAlaNuGvm gLg3MmF7S9TAjjfZjyqvr2KyjGDmV0pFTdae3bALnKW1hPojyvHtfn06HFkDFl3O0CaIRSUKJ eaeN+QEcMIxXgvoMr85XkUTwtBzpnPYzMeQlb63yuKUbXxuF6Dwl6k1njPh9w8OwGb62AMPzH 6YsMqK80FB9HnPuKtsmGCfobHMo1t/rlQeXTAVgKz/JQfdpURE0sBQGelUWke+p2nPw9F8uFK UnB6Jd2OVS8YQIy1P7Y7fxAJuFv7ZPkA71vuPAiuyHF2r1FEOPeaYbqz5QDCmkAUQ3DvHDOUh 5lr6KZB51m/oaZ9fhZsqB+4PeAwGsGviaFqvsw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 c35fdb585c68..afc4ed7b1578 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 f910c514438f..0ef5e5204968 100644 --- a/arch/x86/power/hibernate_64.c +++ b/arch/x86/power/hibernate_64.c @@ -174,7 +174,7 @@ static int relocate_restore_code(void) 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 cc22a24516d6..440b62f7502e 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 f29cd178df90..9e58bdc8a562 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); -- 2.9.0