From patchwork Mon Apr 9 00:18:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 132995 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp765575ljb; Sun, 8 Apr 2018 20:43:54 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/67GukbfyRK1jtEWBXk7zFtfSs7GozZaOMdNKN+gTizqw9gKEQb1aDdKjysXM+oPqXEVjo X-Received: by 10.99.100.68 with SMTP id y65mr24300656pgb.257.1523245433898; Sun, 08 Apr 2018 20:43:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523245433; cv=none; d=google.com; s=arc-20160816; b=f3tHyh7vehT56p9VnXTtA/cxxilEFdAl0CRhtv9gDIUWOw3Tq27LHaT2LeCw+ULphR j6hgdbEY28F9snUYCiZCUR8egmcLxkLRxUXm9/SVw+pj2tVqEshxA/XjzOKFmQZXoOt6 Tm6Ab9ayTmXFoe0Sgw4itQqHSHcVYPN497qSzlKkwebdNrcoZvl/Re0rxJkZfSm9nMoH 1/UFYU0nFgGR7K4/mxUfXwO0Cmk3rEFp0dLaoKw2cN/o/mlSYtV6367moARVYPzuY2MP igDNrLV1hHhby37YBIxcpvnrNap/0Eo8Gtl1oIW56JPx/5DwilrTawNXCxJXRtniwsIq FFQg== 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=92LPbcuP1+Nu6hJ7JSAFmsZgtoYGVkr1KtL7T+wJ5YU=; b=jPEixXHV8GgBsDVGyabJ3mpzk1UeEtxKm20YR24SlpEtePEndecm4XJGZ0AeacaTwN sn8bLAj6rjKkj0bM7ZuiEc0TcwTGYKcExN5wWqEBfxT0m/Z7fx5QjfxVgdNn6q0FOLRI V7xQzVzIIRDq5t614tvj0IfW3JWmq4G+JfTr6/8PIP+rwWBFKbW8akVy8ukrFQWGLmwq sfE+WVjSrYvBXNe8xZenLKcwltBkH7sN5CmSs+N/tn6n18FGRNy99pa7Dh4VImqvJes/ ZBEH8fMTs0kOxWdx2lMz349yWLvm9/pewcuel+BSdLjQHzjL6/pGDvNEHT2oJXJ3aTfA KeSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=IJCJfXZ3; 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 m11si10553633pgd.683.2018.04.08.20.43.53; Sun, 08 Apr 2018 20:43:53 -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=IJCJfXZ3; 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 S1754762AbeDIDns (ORCPT + 29 others); Sun, 8 Apr 2018 23:43:48 -0400 Received: from mail-cys01nam02on0118.outbound.protection.outlook.com ([104.47.37.118]:44776 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754235AbeDIAUb (ORCPT ); Sun, 8 Apr 2018 20:20:31 -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=92LPbcuP1+Nu6hJ7JSAFmsZgtoYGVkr1KtL7T+wJ5YU=; b=IJCJfXZ3vVKkIN02LABs19UxNnng4+IGpBYOn8YO7pDWegfLB9YolzW1bXnBEpwPjjkfvjOaSejGSx18W6CtO7/nHhS2P2yEgWlktm8mzOeqsVs3RNJc83Wr3vz2h5bZT48Lj9wMuxRUcovX1npgMYedmTGOD1oPLMGrWghNgtc= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1110.namprd21.prod.outlook.com (52.132.131.167) 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:20:18 +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:20:18 +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.15 140/189] x86/power: Fix swsusp_arch_resume prototype Thread-Topic: [PATCH AUTOSEL for 4.15 140/189] x86/power: Fix swsusp_arch_resume prototype Thread-Index: AQHTz5hPI3hswFjA/UizBoQlW/Tn3Q== Date: Mon, 9 Apr 2018 00:18:40 +0000 Message-ID: <20180409001637.162453-140-alexander.levin@microsoft.com> References: <20180409001637.162453-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001637.162453-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; DM5PR2101MB1110; 7:Xc71B+BMtMc7QBuc2F/KwJYX7vgBog4Wy1nipqUZY2exu2Nyg8Xwh9LVgAMGbICrBMoYDqlxzTx+UL8BSxQFou7CrnMCEm0OvTFn+dxupnt14l9AUOjveWSV9wHKsjNgjqpRQQXymOh/ilOb7gQ+vnUHyVnJRlKTYfKNrlb83GLRwwogyzTVRglsMdEyftKD94cb/30rif29Hv2UN/Xn7rknFCYiJWna4mSPBYWxQykecPTcBoo0I0TSTsZeFeUg; 20:kHFpjO/AxI7IuZNNJ/+gGvVlpeUnA+XD6o7pGl3/Tog5gVCNt8ze304VfI1uSTqWusewuTPeDjHzoToXB4od5eTY9w6jmR40OeCGrjLhgU1wuF4UiKxGAP5Babhmain4HG5DW66wIEiWbcZju0KWlXgGl45GkfoR9O53LZqTX/k= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 0a3e17fd-a309-4392-c8aa-08d59dafacca x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB1110; x-ms-traffictypediagnostic: DM5PR2101MB1110: 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)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:DM5PR2101MB1110; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1110; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(366004)(346002)(396003)(39380400002)(39860400002)(199004)(189003)(5660300001)(7416002)(478600001)(86612001)(3846002)(6116002)(106356001)(6486002)(72206003)(25786009)(10290500003)(8936002)(6436002)(76176011)(2616005)(6506007)(2900100001)(97736004)(486006)(26005)(36756003)(10090500001)(81166006)(8676002)(81156014)(59450400001)(102836004)(2906002)(99286004)(11346002)(476003)(3660700001)(66066001)(6512007)(575784001)(86362001)(6306002)(53936002)(966005)(105586002)(186003)(5250100002)(14454004)(22452003)(6666003)(2501003)(446003)(7736002)(316002)(1076002)(110136005)(3280700002)(54906003)(68736007)(107886003)(4326008)(305945005)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1110; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: uvaZff6Vft6rNCqIL/JyAlTBIT3IeGuyhgFZfzcIvPQGbCv1DynfMg+WUvidXf6ZTkj8y1X9BcL9/BXjYeozvsdqSUON3Oc7PgzFNvaq/HwTHQO54noksnNoO1e96Z8PB8swnXkBswLPIZ4jBl+Gv++SG4qbBRT2EdNg3M3+mtbrmnD9dZE4JjQM0OesMRimj8wcc0jO+36RsW+XfVhc/kkiCBNZj82IJLfr7ZdFXaa8Xrxymp9OOaXjrH2KPJq0/XfZE8ErgsIzbWElwNDDbMEFi3KQax5+OH5RJExf/PTumwvR3ddeDTbH4/A9bXftcnqCDG5U3gL6fPu38T28zqXnSUI5nXXABvsi+TxswOvfYz5E0tA94UvzMidyTx+DLxL1mienga2JFTKwBT3pD8JBPz9IS/rnfh5P1x1y1aI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0a3e17fd-a309-4392-c8aa-08d59dafacca X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:18:40.3470 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1110 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 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 @@ 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 d60b0f5c38d5..8544357d92d0 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);