From patchwork Mon Apr 9 00:29:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 132966 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp667261ljb; Sun, 8 Apr 2018 18:08:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+PaDHCqRKJRttDwmP56EiHK1IJXLIJnpgcytfoX1lLTZSvG0bk2Dz8hEbfEWisqEG+wG3m X-Received: by 10.99.55.1 with SMTP id e1mr23661206pga.237.1523236116147; Sun, 08 Apr 2018 18:08:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523236116; cv=none; d=google.com; s=arc-20160816; b=1IFJgLau46X6ERYfv3l0OS5NyisAJcs/oY+97BBVuqnU5MyJsTWKbM3ORnt7EnKPhf i5+2G/VYaDtbFaPv5v7rG7Yd0jPWmsR1GsCcdF/HipRg8COnEq4CfeFxM3om2f0hZ+YJ KoDJuJ/ibHKW131QBZd+qMPA3Ud/CGj3h57NwHmIa1Uc1F4F1Umlm4ke0NRfHycBSO7J T10R7URTfCee9CnE0PhrSLq/lRuoeVYLBlhQb60lw+FkUg+59vYY7Y2KX0dIamwhzFxc RyiflK8gKh6KUawVhq5ZnPfT0F61kGGq2ct8BKfy4f/rmY9A003oKmGvCMUITWcHfUX7 f/iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=FAcshN7gB79ZZOdrq/kzj5HwLR2n6NMd/nodWJDZQ8Q=; b=msmbFcaP4UmstbnB2Ipmj96CGUb1YzetfCv/WS9Ue5PKtTRMLBhrTn51XHTZzXvmIE Cikl+KKWoDQsyQSIdiu0U4PmalLi5Y4mPFtbd574FOUdjoQ5fmsT2moctkvrwXADEzgX ri7T5NIi5Cbd28aqg9Q23USWQiWlstG0b5RXf/D5IszOW/Vv6k05FYHGzhaLI0xax0o+ dwQThxtRjMegq+IyrOfOq7UveCeilcHjdkXUeuYU0n5Gfy3AJ+ZGdQzY4mjsSAIMk7Fb MYCWm+jKBXSGT5bEVsAJ2zw3mfv+iRdOon5mFPwuMu5NsuLiTgAMvhfJCZEpJuHgpkfU IoQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=EVKFfkSF; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h132si11824482pfe.52.2018.04.08.18.08.35; Sun, 08 Apr 2018 18:08:36 -0700 (PDT) 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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=EVKFfkSF; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932632AbeDIBIb (ORCPT + 29 others); Sun, 8 Apr 2018 21:08:31 -0400 Received: from mail-co1nam03on0103.outbound.protection.outlook.com ([104.47.40.103]:64416 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932996AbeDIAiu (ORCPT ); Sun, 8 Apr 2018 20:38:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=FAcshN7gB79ZZOdrq/kzj5HwLR2n6NMd/nodWJDZQ8Q=; b=EVKFfkSFLevmwKmWOKJ4szQ7Rf3mXGwA4l+PKfQ96ZJgYZ/idjQY/LTUcXeZMoy0ZjlOEmtOy2u3ErJMhubCHxD6/Rqr3sc/UJQ5WjbFezVzMVd1GS23FfF+r6NbvUX+Ti86821RqtnXIKhrIAQmE919rhf6ti4WHPt0JhpBLlw= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1125.namprd21.prod.outlook.com (52.132.130.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:38:44 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:38:44 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Arnd Bergmann , Thomas Gleixner , Len Brown , Andi Kleen , Nicolas Pitre , "linux-pm@vger.kernel.org" , "Rafael J. Wysocki" , Pavel Machek , Bart Van Assche , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 144/162] x86/power: Fix swsusp_arch_resume prototype Thread-Topic: [PATCH AUTOSEL for 4.4 144/162] x86/power: Fix swsusp_arch_resume prototype Thread-Index: AQHTz5nZi6wwjhwO/EaancXIq4cVOA== Date: Mon, 9 Apr 2018 00:29:41 +0000 Message-ID: <20180409002738.163941-144-alexander.levin@microsoft.com> References: <20180409002738.163941-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002738.163941-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB1125; 7:hpeQMxtWudmzC+rvbeVdutwJljiXm9sE1yQc8xh7PzTzGk/Di68yI/OnP8sEeZqo7dmYzf6MRaoHaceD3QoCNsDsobFzZJXlPnjkhpIyJHZXfvMAdISR9u9Zh/U9foD+Jf9IdxKu/Gi8xtX5GKN2C62240n25oJA1IfVg8UO3YLfRDH/UEToQfZk7TXF7k2cwopGa6BI401wbfeEGU/gexEKiBYHjlrOarrUON7XbdiVyHg+EA7Ms7XOricSMuep; 20:iruIWNGnp6uu4hIN8m3PWnfKMu1OU8eFNjLHqSxhaeRvuqCgYzy1+UC7gV80fj0x5VyKiS3KkCVF9mjf1x0SLE6UGnsZadyCyjMBGKsWz2PJhl+NqJp2u0FjZdBnD9zUilmvCbzj4+ItOCcvRw4/G5P+DAGPfV0+sHH0Wlj/YeI= X-MS-Office365-Filtering-Correlation-Id: 3ef2cf39-8b1a-4cc2-bd05-08d59db23ff8 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603328)(7193020); SRVR:DM5PR2101MB1125; x-ms-traffictypediagnostic: DM5PR2101MB1125: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(9452136761055)(42068640409301)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM5PR2101MB1125; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1125; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(39860400002)(39380400002)(366004)(376002)(396003)(189003)(199004)(2906002)(25786009)(6512007)(10090500001)(3280700002)(10290500003)(6666003)(6306002)(3660700001)(316002)(110136005)(54906003)(11346002)(107886003)(2616005)(476003)(446003)(36756003)(7416002)(99286004)(86612001)(53936002)(4326008)(486006)(6436002)(3846002)(81156014)(305945005)(966005)(5250100002)(1076002)(102836004)(14454004)(66066001)(7736002)(105586002)(81166006)(59450400001)(106356001)(8676002)(97736004)(6116002)(6506007)(6486002)(5660300001)(186003)(76176011)(22452003)(72206003)(478600001)(2501003)(2900100001)(26005)(86362001)(575784001)(8936002)(68736007)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1125; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: T48sArjaZfMda5HSOpZVPiYMCeTJpvN2gbwhoyHIHNk7DnCnT2wthK2UlCtisPOeqPLMk4/0LVWm446/CDFt+77uOhn83qZrp9BbRGfExxXfRPGT02GIS97Ui4PfviEQg/dcr1lvDCYNZcDV1FnKYiEcqkhPFa/1h3MAw9AfzZaGiyAhzE9qbiwMTKIW7opIEzZPbcjv6MxWOPMUjhV5GR1v9RFPFs53w5ryK+houOFRBsW3XYDQLpVvDoVyABHQfPJX13lJDCKyu232jRJj+iPX4FTmTQsLRIJPYj79duFsxW69FiidZHwDNVoqWHCbpIjJyaV2ZkikIYqKFM15XMnQjeRbJKTdrg13X5nZFZYZK4EOhnwveyOE4FaMscBVDV7mm6srFMhrbAK9mxF+E5xI1XiETa0JjCrNSgQnn1I= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ef2cf39-8b1a-4cc2-bd05-08d59db23ff8 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:29:41.6308 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1125 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 328008a72d38b5bde6491e463405c34a81a65d3e ] 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 Signed-off-by: Sasha Levin --- 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(-) -- 2.15.1 diff --git a/arch/x86/power/hibernate_32.c b/arch/x86/power/hibernate_32.c index 291226b952a9..77ac4e4deb16 100644 --- a/arch/x86/power/hibernate_32.c +++ b/arch/x86/power/hibernate_32.c @@ -142,7 +142,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 009947d419a6..0e0c773edffc 100644 --- a/arch/x86/power/hibernate_64.c +++ b/arch/x86/power/hibernate_64.c @@ -78,7 +78,7 @@ static int set_up_temporary_mappings(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 8b6ec7ef0854..4a69bca7c6ab 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -377,6 +377,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 caadb566e82b..25367fc0b152 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h @@ -85,9 +85,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);