From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758311AbcLQA3m (ORCPT ); Fri, 16 Dec 2016 19:29:42 -0500 Received: from blatinox.fr ([51.254.120.209]:34030 "EHLO vps202351.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753675AbcLQA3g (ORCPT ); Fri, 16 Dec 2016 19:29:36 -0500 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lefaure?= To: Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: linux-kernel@vger.kernel.org, =?UTF-8?q?J=C3=A9r=C3=A9my=20Lefaure?= Subject: [PATCH] irqchip: st: fix defined but not used compilation warning Date: Fri, 16 Dec 2016 19:29:27 -0500 Message-Id: <20161217002927.31947-1-jeremy.lefaure@lse.epita.fr> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_PM_SLEEP is disabled, the compiler raises a warning on st_irq_syscfg_resume: drivers/irqchip/irq-st.c:183:12: warning: 'st_irq_syscfg_resume' defined but not used [-Wunused-function] static int st_irq_syscfg_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~~ Adding __maybe_unused to the declaration of this functions removes the warning. Signed-off-by: Jérémy Lefaure --- drivers/irqchip/irq-st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-st.c b/drivers/irqchip/irq-st.c index 9af48a85c16f..5e0e250db0be 100644 --- a/drivers/irqchip/irq-st.c +++ b/drivers/irqchip/irq-st.c @@ -180,7 +180,7 @@ static int st_irq_syscfg_probe(struct platform_device *pdev) return st_irq_syscfg_enable(pdev); } -static int st_irq_syscfg_resume(struct device *dev) +static int __maybe_unused st_irq_syscfg_resume(struct device *dev) { struct st_irq_syscfg *ddata = dev_get_drvdata(dev); -- 2.11.0