From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x227kmubJSb3CWdNGxISvMAg24oW4+R6MFhToRvsx01/oB6gBe6oTE+1iK5Sdbp3/xCp6u9/l ARC-Seal: i=1; a=rsa-sha256; t=1519411594; cv=none; d=google.com; s=arc-20160816; b=FWsOgwPmx9o4AB3D0aDFOnrGQgTlMRgyoRgFTeMH/w6AalZQB1mHUoOWVThGpcWiBw 3RtbLCh68nymbIaXZoSMpKgXNOhfsr37mgIdLSTSkPk9mVBe8kLwVSd6E/2ErFd78KO2 PMQvvXQhg2E5iSIr96PEWDCx0vDUXXT9MSz/FNXiqJuEmWYoJdlUvI9rwp4qfKsxtV2f Fs8ePzBpxwmiLgAaB7YHFvjTSlMVMKaz8CD+VNXoRvbdJT5Lfx4Pt0ohs4GE8Yu3Rqio rI9XVWKd8hT1z/pHb2YDQo9tkl8G8EgXhjr/NRQw3ablkRYbcG67u5rro5TYJM1XlXqw fE9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=ZQ2KC0bqqhyfSH6Ar0DMDhEpiTD1rnIFyuNb1DQiEf0=; b=gCN6d79aAK4m5s8rbaw5hlO/LndVMi5tPKmfunD4Hxu5paFKGbLjUeG3QrS9Qij3r9 CZdKRm5cSchmqBL6YqNm7ZuHFAv40th0McOdqzKcyn2F3Tg8TY6UWQPMtBBSKquvLWk8 lp1/YelFkfImDPLl52LeoLgPyUfxdwUts4AEkSZ/UMJFIOIreYFKPnxH6kdXRqeGVd8y cISZY8asAWzYa382jxebsoOPWiAcu+OXwbbMg1mmt3U8+YxW0yeuTbioEfeHck4HZvdZ qba+kjJO1lPQ003WFV56RiHeKTcisoZQ0nHqVWWqBz6JQPcMOR5Qu4TpB3d1qjlcHa9b UJEg== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Augusto Mecking Caringi , Andy Shevchenko , Linus Walleij Subject: [PATCH 4.9 097/145] gpio: intel-mid: Fix build warning when !CONFIG_PM Date: Fri, 23 Feb 2018 19:26:43 +0100 Message-Id: <20180223170737.376373846@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170724.669759283@linuxfoundation.org> References: <20180223170724.669759283@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcU2VudCI=?= X-GMAIL-THRID: =?utf-8?q?1593217851358846377?= X-GMAIL-MSGID: =?utf-8?q?1593218532356350834?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Augusto Mecking Caringi commit fbc2a294f29e726787a0f5238b27137904f26b81 upstream. The only usage of function intel_gpio_runtime_idle() is here (in the same file): static const struct dev_pm_ops intel_gpio_pm_ops = { SET_RUNTIME_PM_OPS(NULL, NULL, intel_gpio_runtime_idle) }; And when CONFIG_PM is not set, the macro SET_RUNTIME_PM_OPS expands to nothing, causing the following compiler warning: drivers/gpio/gpio-intel-mid.c:324:12: warning: ‘intel_gpio_runtime_idle’ defined but not used [-Wunused-function] static int intel_gpio_runtime_idle(struct device *dev) Fix it by annotating the function with __maybe_unused. Signed-off-by: Augusto Mecking Caringi Acked-by: Andy Shevchenko Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman --- drivers/gpio/gpio-intel-mid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpio/gpio-intel-mid.c +++ b/drivers/gpio/gpio-intel-mid.c @@ -321,7 +321,7 @@ static void intel_mid_irq_init_hw(struct } } -static int intel_gpio_runtime_idle(struct device *dev) +static int __maybe_unused intel_gpio_runtime_idle(struct device *dev) { int err = pm_schedule_suspend(dev, 500); return err ?: -EBUSY;