Skip to contentSkip to conversation

irqchip: Silence sparse warning

PATCH In review Stephen Boyd 3 participants 5 messages Mar 5, 2014 – Mar 12, 2014 irqchip drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irqchip: Silence sparse warning

drivers/irqchip/irqchip.c:27:13: warning: symbol 'irqchip_init' was not declared. Should it be static?

---
 drivers/irqchip/irqchip.c | 1 +
 1 file changed, 1 insertion(+)
drivers/irqchip/irqchip.c +1 -0
index f496afce29de..3469141f10f6 100644
@@ -10,6 +10,7 @@
 
 #include <linux/init.h>
 #include <linux/of_irq.h>
+#include <linux/irqchip.h>
 
 #include "irqchip.h"
 
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#1 lore raw
irqchip: Silence sparse warning
Commit-ID:  559ba4b153acfbfe49007def9d0efc475d5f937c
Gitweb:     http://git.kernel.org/tip/559ba4b153acfbfe49007def9d0efc475d5f937c
Author:     Stephen Boyd <[email protected]>
AuthorDate: Tue, 4 Mar 2014 17:01:21 -0800
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Thu, 6 Mar 2014 11:40:47 +0100

irqchip: Silence sparse warning

drivers/irqchip/irqchip.c:27:13: warning: symbol 'irqchip_init' was not declared. Should it be static?

---
 drivers/irqchip/irqchip.c | 1 +
 1 file changed, 1 insertion(+)
drivers/irqchip/irqchip.c +1 -0
index f496afc..3469141 100644
@@ -10,6 +10,7 @@
 
 #include <linux/init.h>
 #include <linux/of_irq.h>
+#include <linux/irqchip.h>
 
 #include "irqchip.h"
 
#2 lore raw
In reply to Stephen Boyd
Quoted 4 lines · Stephen Boyd

drivers/irqchip/irqchip.c:27:13: warning: symbol 'irqchip_init' was not declared. Should it be static?

Why do we have to have drivers/irqchip/irqchip.h and include/linux/irqchip.h anyway?

Quoted 15 lines
---
 drivers/irqchip/irqchip.c | 1 +
 1 file changed, 1 insertion(+)
drivers/irqchip/irqchip.c +1 -0
index f496afce29de..3469141f10f6 100644
@@ -10,6 +10,7 @@
 
 #include <linux/init.h>
 #include <linux/of_irq.h>
+#include <linux/irqchip.h>
 
 #include "irqchip.h"
Signature · 2 lines
Jiri Kosina
SUSE Labs
#3 lore raw
Quoted 8 lines · Jiri Kosina
Quoted 4 lines · Stephen Boyd

drivers/irqchip/irqchip.c:27:13: warning: symbol 'irqchip_init' was not declared. Should it be static?

Why do we have to have drivers/irqchip/irqchip.h and include/linux/irqchip.h anyway?

include/linux/irqchip.h is for irqchip_init() which is typically called from arch layers. drivers/irqchip/irqchip.h is for irqchip drivers to include so they can use the IRQCHIP_DECLARE macro. Perhaps you're pointing out that the "irqchip.h" include in irqchip.c is unused? How about this patch?

----8<----

From: Stephen Boyd <[email protected]>
Subject: [PATCH] irqchip: Remove unused include

The "irqchip.h" include here is not needed as the only thing in irqchip.h is IRQCHIP_DECLARE which this file doesn't use. Drop it.

---
 drivers/irqchip/irqchip.c | 2 --
 1 file changed, 2 deletions(-)
drivers/irqchip/irqchip.c +0 -2
index 3469141f10f6..cad3e2495552 100644
@@ -12,8 +12,6 @@
 #include <linux/of_irq.h>
 #include <linux/irqchip.h>
 
-#include "irqchip.h"
-
 /*
  * This special of_device_id is the sentinel at the end of the
  * of_device_id[] array of all irqchips. It is automatically placed at
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
#4 lore raw

[tip:irq/core] irqchip: Remove unused include

irqchip: Remove unused include
Commit-ID:  1a75b8e64571a85d5e648cfdf4c40e0d9923abc5
Gitweb:     http://git.kernel.org/tip/1a75b8e64571a85d5e648cfdf4c40e0d9923abc5
Author:     Stephen Boyd <[email protected]>
AuthorDate: Tue, 11 Mar 2014 13:51:49 -0700
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Wed, 12 Mar 2014 13:12:04 +0100

irqchip: Remove unused include

The "irqchip.h" include here is not needed as the only thing in irqchip.h is IRQCHIP_DECLARE which this file doesn't use. Drop it.

---
 drivers/irqchip/irqchip.c | 2 --
 1 file changed, 2 deletions(-)
drivers/irqchip/irqchip.c +0 -2
index 3469141..cad3e24 100644
@@ -12,8 +12,6 @@
 #include <linux/of_irq.h>
 #include <linux/irqchip.h>
 
-#include "irqchip.h"
-
 /*
  * This special of_device_id is the sentinel at the end of the
  * of_device_id[] array of all irqchips. It is automatically placed at