Re: [PATCH] irqchip: Silence sparse warning

From: Stephen Boyd
Date: Tue Mar 11 2014 - 16:51:58 EST


On 03/10/14 06:08, Jiri Kosina wrote:
> On Tue, 4 Mar 2014, Stephen Boyd wrote:
>
>> drivers/irqchip/irqchip.c:27:13: warning: symbol 'irqchip_init'
>> was not declared. Should it be static?
>>
>> Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxxxxxx>
> 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 <sboyd@xxxxxxxxxxxxxx>
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.

Reported-by: Jiri Kosina <jkosina@xxxxxxx>
Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxxxxxx>
---
drivers/irqchip/irqchip.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/irqchip/irqchip.c b/drivers/irqchip/irqchip.c
index 3469141f10f6..cad3e2495552 100644
--- a/drivers/irqchip/irqchip.c
+++ b/drivers/irqchip/irqchip.c
@@ -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


--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/