Received: by 10.223.185.116 with SMTP id b49csp1133101wrg; Fri, 23 Feb 2018 12:31:03 -0800 (PST) X-Google-Smtp-Source: AH8x225rQOjk0DMbCBaCwbmFrDaGsG0BnOKGpMHhBBWrZCIMPAzmYh5Qxg4qUabb1t1A3wagbaMJ X-Received: by 2002:a17:902:ab8c:: with SMTP id f12-v6mr2753182plr.171.1519417863275; Fri, 23 Feb 2018 12:31:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519417863; cv=none; d=google.com; s=arc-20160816; b=MRrRa27NME0oeAOz2omAK6teb45psm58xi8sycXHUQH6JgYFNN8awsWjaJJyVw7nMk YwcELSdtBYUS4FWLlU77reVkkJsonjNMtR4O7cnIULFh5P0qTMLrxBqfFWBMb/p7Zjdy u7Aoz5XW9qqjsXmCoF8dsTG3jKbHOKqgOh8qfBB3aqXmxH1qJnpJh4ZPfAkoGUKcNAON T+X1P39nfc/u30eDBSTVmmRQV60uF+efYYd2YowY5qz4zlHjpYHs+J4ewUBFlcT/uLVP vE73AiU//vXe7uDiH/uiMuC+3rm0MZFZctY4WtOVoRTSrem9M/f8oNRSl0PQG34XUQaw XFWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=WLduuRkSZl1JmCTw61MWlBa3zpia4u7YpUWPklIbjfg=; b=ZF8a8nmpIoC5UyR9tW4w9If0b9xounqRJtFPsT0FuWnfUct8BwrpAAz4NsuewA4Nuu jRh9aW9bMJGGbAbuxXHvfRc18U35ZIAhSWxm5vqaV3YN4lx2IK93ADGC1+k86m6ST7E+ hW0lkT3tCRYjttHkr3v2v1+7izW+tYZhRZM5wqqv4QzkMNllxrBx953xPdZ8ymUhneM1 uqoMJz4eqzo/InyfCkLIh/oIzESAfDe3ChCxsa6OcHU9XwYXbmRtwQMpChlSiR0aaNlw c0/V0Oiczbs/VYUhxEINeF3IfpU/v7/URBu7FtxKZIY8fprWFw+6/e1sFEEaoKA/MgsL bu3Q== 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 b59-v6si2281139plc.596.2018.02.23.12.30.49; Fri, 23 Feb 2018 12:31:03 -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 S932076AbeBWSg2 (ORCPT + 99 others); Fri, 23 Feb 2018 13:36:28 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:37716 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754058AbeBWSg0 (ORCPT ); Fri, 23 Feb 2018 13:36:26 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 930491312; Fri, 23 Feb 2018 18:36:25 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Eduardo Valentin Subject: [PATCH 4.4 082/193] thermal: spear: use __maybe_unused for PM functions Date: Fri, 23 Feb 2018 19:25:15 +0100 Message-Id: <20180223170338.856572963@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit d612c64d1f4d6b2464993dfeafd9ec319f774188 upstream. 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: Greg Kroah-Hartman --- drivers/thermal/spear_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/drivers/thermal/spear_thermal.c +++ b/drivers/thermal/spear_thermal.c @@ -54,8 +54,7 @@ static struct thermal_zone_device_ops op .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 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 d return 0; } -#endif static SIMPLE_DEV_PM_OPS(spear_thermal_pm_ops, spear_thermal_suspend, spear_thermal_resume);