Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1543865 > unrolled thread

[PATCH] irqchip: st: fix defined but not used compilation warning

Started byJérémy Lefaure <jeremy.lefaure@lse.epita.fr>
First post2016-12-17 01:30 +0100
Last post2016-12-19 11:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] irqchip: st: fix defined but not used compilation warning Jérémy Lefaure          <jeremy.lefaure@lse.epita.fr> - 2016-12-17 01:30 +0100
    [tip:irq/urgent] irqchip/st: Mark st_irq_syscfg_resume()  __maybe_unused "tip-bot for Jérémy Lefaure" <tipbot@zytor.com> - 2016-12-19 11:10 +0100

#1543865 — [PATCH] irqchip: st: fix defined but not used compilation warning

FromJérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Date2016-12-17 01:30 +0100
Subject[PATCH] irqchip: st: fix defined but not used compilation warning
Message-ID<sPb2W-2eE-1@gated-at.bofh.it>
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 <jeremy.lefaure@lse.epita.fr>
---
 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

[toc] | [next] | [standalone]


#1544422 — [tip:irq/urgent] irqchip/st: Mark st_irq_syscfg_resume() __maybe_unused

From"tip-bot for Jérémy Lefaure" <tipbot@zytor.com>
Date2016-12-19 11:10 +0100
Subject[tip:irq/urgent] irqchip/st: Mark st_irq_syscfg_resume() __maybe_unused
Message-ID<sQ33l-6mo-55@gated-at.bofh.it>
In reply to#1543865
Commit-ID:  f357563f958df06cd9ea9e614cdba30578bb08b1
Gitweb:     http://git.kernel.org/tip/f357563f958df06cd9ea9e614cdba30578bb08b1
Author:     Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
AuthorDate: Fri, 16 Dec 2016 19:29:27 -0500
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 19 Dec 2016 10:55:43 +0100

irqchip/st: Mark st_irq_syscfg_resume() __maybe_unused

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)
             ^~~~~~~~~~~~~~~~~~~~

Annotate the function with __maybe_unused.

Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/20161217002927.31947-1-jeremy.lefaure@lse.epita.fr
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 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 9af48a8..5e0e250 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);
 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web