From patchwork Thu Mar 1 15:27:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 130272 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp2951763edc; Thu, 1 Mar 2018 07:37:59 -0800 (PST) X-Google-Smtp-Source: AG47ELspAy0Rr2rQiPNq1okxCnSvVNs9dJ+2b74IUkbc/NIakh/zVpiEgFL3b1mOWKxrwS0/W9A6 X-Received: by 10.99.171.70 with SMTP id k6mr1903389pgp.355.1519918679383; Thu, 01 Mar 2018 07:37:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519918679; cv=none; d=google.com; s=arc-20160816; b=Y/O97OjW7uQq+6rA/APZQ26AsemqBqf4wnaTr3f74z20ZTHM80rT/VfDzY6zWbkod5 lSpF/W11u78FIvJQBTTjq41WJ+pHJ5tOlnJ+8rLomKMp6ePQD7ynFr30boVsS050p1Z7 q9TJGk7aR2aSWGZ5BUsIJpdO+vZoNjKvcKJ/iwuDY+3CyuJU1G/aRLU/QmPl2Xecz9Oq Uba2XCP7wFAY9/sV+QB6/CZIzcV4oSnQQ2JfOPyZFpKg9E+3t5T7nOpHIgE325qAoJb7 U/mdvFuJ4A2nW62NILLNHp4mUZf0xoF3GArUk5anKt6fWCCPFPF9u/oXPyR1e6CDGZRX /C1g== 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=xMnUviJyc5Q+iTHIjNJ55fSVK4y7hPfVqS7+Fp037fE=; b=UJCnACtxAIMiJTdx1ym5VNiB5FCSC5VJlloTyNlFMWM5msdRfF9wOQE7luwLvSUBmY 3p0Sow7sbPJkCHbLpV9NdIplKhwSVrAFaXg+zg+SMbQ1GWQEx06Z6kWhd6lRgquLJUo1 nKCbzF49Owia433c5kSUXsKVUHXD5nZXJruGgOo5Vw/AN5l+d/TY9aYmPHvyUAR3KNxt jft0x8o8Iv0dmwWTJKPl4Iqe2NI668RkcFaarmOm+aZMma48vmy7DZRu6qt0WbO9kH9d HkISHnf9o5BLrUh8JAnr95h2HoNKUj9P4vUHI5+VOnD9Qs/RZNl4IWE5xK+VqUQ1OOUL mmLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=c9v2lMx/; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 g10-v6si2863008plk.730.2018.03.01.07.37.59; Thu, 01 Mar 2018 07:37:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=c9v2lMx/; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 S1032528AbeCAPh5 (ORCPT + 10 others); Thu, 1 Mar 2018 10:37:57 -0500 Received: from mail-cys01nam02on0129.outbound.protection.outlook.com ([104.47.37.129]:45715 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1032532AbeCAPhu (ORCPT ); Thu, 1 Mar 2018 10:37:50 -0500 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=xMnUviJyc5Q+iTHIjNJ55fSVK4y7hPfVqS7+Fp037fE=; b=c9v2lMx/tOH1ue943ZNbZpAge0NFa7rair2Wion+GO6q74CoKIblDUswqtpzVFlJrUsDy8d9SGH7zExdap1OeK/yp3SUKs8NoqBdfYL6MUBWEUNAiUn78gq4drVTrHwU91ThNewmwfmV4kAjvwVv80YoZoITYPmAUhPHaITlCi0= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1014.namprd21.prod.outlook.com (52.132.133.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.3; Thu, 1 Mar 2018 15:37:44 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0567.006; Thu, 1 Mar 2018 15:37:44 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Arnd Bergmann , Eduardo Valentin , Sasha Levin Subject: [added to the 4.1 stable tree] thermal: spear: use __maybe_unused for PM functions Thread-Topic: [added to the 4.1 stable tree] thermal: spear: use __maybe_unused for PM functions Thread-Index: AQHTsXHEoA1bNvHQwEa73Kt5HD5Mxg== Date: Thu, 1 Mar 2018 15:27:11 +0000 Message-ID: <20180301152116.1486-440-alexander.levin@microsoft.com> References: <20180301152116.1486-1-alexander.levin@microsoft.com> In-Reply-To: <20180301152116.1486-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; DM5PR2101MB1014; 7:6DU0MxscyUkTOA2d3vAs1SRPiqYUIQt6kNjh7yRp5T2mOlO6S5E0qF0e2fx5ileHavZWz1Bb9rthRgZ0sRhnzoZuq4sM26Grakaq7TdGEGysEOII1jdLl3vBmGCkLvFWaSwmZFRLuJJRkQCmPdn6bN+9bFBe5NC0VsNJawbQK28/99Ht/zJbwkZ5Yw76mQsLOWiWSviggzj5LVwgGBPh4YZJoHqpwEG65ZpvWuO1yryyIFoW7tE3ckqGY3QLOkQz x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 27cbcccb-e284-4cb5-20d9-08d57f8a6069 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7193020); SRVR:DM5PR2101MB1014; x-ms-traffictypediagnostic: DM5PR2101MB1014: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(85827821059158); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(3231220)(944501228)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(61426038)(61427038)(6041288)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:DM5PR2101MB1014; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1014; x-forefront-prvs: 05986C03E0 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(39380400002)(346002)(39860400002)(376002)(396003)(199004)(189003)(53936002)(2906002)(3280700002)(6436002)(6486002)(3846002)(6512007)(2900100001)(6116002)(2950100002)(107886003)(6666003)(72206003)(5660300001)(36756003)(10090500001)(3660700001)(14454004)(7736002)(305945005)(97736004)(1076002)(22452003)(26005)(6506007)(105586002)(86362001)(59450400001)(478600001)(68736007)(102836004)(4326008)(6346003)(39060400002)(54906003)(110136005)(81156014)(81166006)(86612001)(8936002)(186003)(10290500003)(8676002)(76176011)(316002)(2501003)(66066001)(25786009)(5250100002)(106356001)(99286004)(22906009); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1014; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: ErkcjunBcjRx8yb7zBdqcXAVimkpsAP+S06MnwNfIEX9yYd4xpwN8IDvhuzHOCYfuSTuZ69YK7rGYNtv0n6kgCPROPVAZ1ysotfin0t1lN8SAVnb5s5/skn0Qetgf34SmWpv7QzXTX+c4SoA4y6IRAOV9lUqLoNn0ay9tQKn/Hw= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 27cbcccb-e284-4cb5-20d9-08d57f8a6069 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2018 15:27:11.7451 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1014 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann This patch has been added to the 4.1 stable tree. If you have any objections, please let us know. -- 2.14.1 =============== [ Upstream commit d612c64d1f4d6b2464993dfeafd9ec319f774188 ] The spear thermal driver hides its suspend/resume function conditionally based on CONFIG_PM, but references them based on CONFIG_PM_SLEEP, so we get a warning if the former is set but the latter is not: thermal/spear_thermal.c:58:12: warning: 'spear_thermal_suspend' defined but not used [-Wunused-function] thermal/spear_thermal.c:75:12: warning: 'spear_thermal_resume' defined but not used [-Wunused-function] This removes the #ifdef and instead uses a __maybe_uninitialized annotation to avoid the warning and improve compile-time coverage. Signed-off-by: Arnd Bergmann Signed-off-by: Eduardo Valentin Signed-off-by: Sasha Levin --- drivers/thermal/spear_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/spear_thermal.c b/drivers/thermal/spear_thermal.c index bddb71744a6c..9d42f88a4224 100644 --- a/drivers/thermal/spear_thermal.c +++ b/drivers/thermal/spear_thermal.c @@ -54,8 +54,7 @@ static struct thermal_zone_device_ops ops = { .get_temp = thermal_get_temp, }; -#ifdef CONFIG_PM -static int spear_thermal_suspend(struct device *dev) +static int __maybe_unused spear_thermal_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct thermal_zone_device *spear_thermal = platform_get_drvdata(pdev); @@ -72,7 +71,7 @@ static int spear_thermal_suspend(struct device *dev) return 0; } -static int spear_thermal_resume(struct device *dev) +static int __maybe_unused spear_thermal_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct thermal_zone_device *spear_thermal = platform_get_drvdata(pdev); @@ -94,7 +93,6 @@ static int spear_thermal_resume(struct device *dev) return 0; } -#endif static SIMPLE_DEV_PM_OPS(spear_thermal_pm_ops, spear_thermal_suspend, spear_thermal_resume);