mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yingjoe Chen <yingjoe.chen@mediatek.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Jiang Liu <jiang.liu@linux.intel.com>,
	Marc Zyngier <marc.zyngier@arm.com>
Cc: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Russell King <linux@arm.linux.org.uk>,
	Jason Cooper <jason@lakedaemon.net>,
	Yingjoe Chen <yingjoe.chen@mediatek.com>,
	Grant Likely <grant.likely@linaro.org>,
	Boris BREZILLON <boris.brezillon@free-electrons.com>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Yijing Wang <wangyijing@huawei.com>,
	<srv_heupstream@mediatek.com>, <yingjoe.chen@gmail.com>,
	<hc.yen@mediatek.com>, <eddie.huang@mediatek.com>,
	<nathan.chung@mediatek.com>, <yh.chen@mediatek.com>,
	Sascha Hauer <kernel@pengutronix.de>
Subject: [PATCH v6 1/6] irqdomain: Use consistent prototype for irq_domain_free_irqs_*
Date: Thu, 13 Nov 2014 23:37:04 +0800	[thread overview]
Message-ID: <1415893029-2971-2-git-send-email-yingjoe.chen@mediatek.com> (raw)
In-Reply-To: <1415893029-2971-1-git-send-email-yingjoe.chen@mediatek.com>

When using irq_domain_free_irqs_top() directly in irq_domain_ops, gcc
generate the following warnings:

../drivers/irqchip/irq-gic.c:879:2: warning: initialization from incompatible pointer type [enabled by default]
../drivers/irqchip/irq-gic.c:879:2: warning: (near initialization for 'gic_irq_domain_hierarchy_ops.free') [enabled by default]

Change to use consistent prototype for all irq_domain_free_irqs*

Better to fold this into "irqdomain: Introduce new interfaces to
support hierarchy irqdomains"

Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
---
 include/linux/irqdomain.h | 8 +++++---
 kernel/irq/irqdomain.c    | 8 ++++----
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index 640a1ec..534dd72 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -270,9 +270,10 @@ extern void irq_domain_set_info(struct irq_domain *domain, unsigned int virq,
 				void *handler_data, const char *handler_name);
 extern void irq_domain_reset_irq_data(struct irq_data *irq_data);
 extern void irq_domain_free_irqs_common(struct irq_domain *domain,
-					int virq, int nr_irqs);
+					unsigned int virq,
+					unsigned int nr_irqs);
 extern void irq_domain_free_irqs_top(struct irq_domain *domain,
-				     int virq, int nr_irqs);
+				     unsigned int virq, unsigned int nr_irqs);
 
 static inline int irq_domain_alloc_irqs_parent(struct irq_domain *domain,
 				int irq_base, unsigned int nr_irqs, void *arg)
@@ -284,7 +285,8 @@ static inline int irq_domain_alloc_irqs_parent(struct irq_domain *domain,
 }
 
 static inline void irq_domain_free_irqs_parent(struct irq_domain *domain,
-					int irq_base, unsigned int nr_irqs)
+					unsigned int irq_base,
+					unsigned int nr_irqs)
 {
 	if (domain->parent && domain->parent->ops->free)
 		domain->parent->ops->free(domain->parent, irq_base, nr_irqs);
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 8b0edde..705fb57 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -899,8 +899,8 @@ void irq_domain_reset_irq_data(struct irq_data *irq_data)
 	irq_data->chip_data = NULL;
 }
 
-void irq_domain_free_irqs_common(struct irq_domain *domain, int virq,
-				 int nr_irqs)
+void irq_domain_free_irqs_common(struct irq_domain *domain, unsigned int virq,
+				 unsigned int nr_irqs)
 {
 	int i;
 	struct irq_data *irq_data;
@@ -913,8 +913,8 @@ void irq_domain_free_irqs_common(struct irq_domain *domain, int virq,
 	irq_domain_free_irqs_parent(domain, virq, nr_irqs);
 }
 
-void irq_domain_free_irqs_top(struct irq_domain *domain, int virq,
-			      int nr_irqs)
+void irq_domain_free_irqs_top(struct irq_domain *domain, unsigned int virq,
+			      unsigned int nr_irqs)
 {
 	int i;
 
-- 
1.8.1.1.dirty


  reply	other threads:[~2014-11-13 15:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-13 15:37 [PATCH v6 0/6] ARM: mediatek: Add support for interrupt polarity Yingjoe Chen
2014-11-13 15:37 ` Yingjoe Chen [this message]
2014-11-13 15:37 ` [PATCH v6 2/6] genirq: Add more helper functions to support stacked irq_chip Yingjoe Chen
2014-11-23 18:09   ` [tip:irq/irqdomain] " tip-bot for Yingjoe Chen
2014-11-13 15:37 ` [PATCH v6 3/6] irqchip: gic: Support hierarchy irq domain Yingjoe Chen
2014-11-14 18:30   ` Marc Zyngier
2014-11-13 15:37 ` [PATCH v6 4/6] ARM: mediatek: Add sysirq interrupt polarity support Yingjoe Chen
2014-11-14 18:35   ` Marc Zyngier
2014-11-13 15:37 ` [PATCH v6 5/6] ARM: mediatek: Add sysirq in mt6589/mt8135/mt8127 dtsi Yingjoe Chen
2014-11-13 15:37 ` [PATCH v6 6/6] dt-bindings: add bindings for mediatek sysirq Yingjoe Chen
2014-11-14 11:13 ` [PATCH v6 0/6] ARM: mediatek: Add support for interrupt polarity Matthias Brugger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1415893029-2971-2-git-send-email-yingjoe.chen@mediatek.com \
    --to=yingjoe.chen@mediatek.com \
    --cc=bhelgaas@google.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eddie.huang@mediatek.com \
    --cc=grant.likely@linaro.org \
    --cc=hc.yen@mediatek.com \
    --cc=jason@lakedaemon.net \
    --cc=jiang.liu@linux.intel.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=nathan.chung@mediatek.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=srv_heupstream@mediatek.com \
    --cc=tglx@linutronix.de \
    --cc=wangyijing@huawei.com \
    --cc=yh.chen@mediatek.com \
    --cc=yingjoe.chen@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®