From: David Daney <ddaney.cavm@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>,
devicetree-discuss@lists.ozlabs.org,
Grant Likely <grant.likely@secretlab.ca>,
Rob Herring <rob.herring@calxeda.com>
Cc: linux-kernel@vger.kernel.org, linux-mips@linux-mips.org,
David Daney <david.daney@cavium.com>
Subject: [PATCH v2 2/4] irq/of/ARM: Make irq_domain hwirq type consistent throughout the kernel.
Date: Wed, 14 Dec 2011 18:32:08 -0800 [thread overview]
Message-ID: <1323916330-8865-3-git-send-email-ddaney.cavm@gmail.com> (raw)
In-Reply-To: <1323916330-8865-1-git-send-email-ddaney.cavm@gmail.com>
From: David Daney <david.daney@cavium.com>
There is a mixture of unsigned long and unsigned int being used with
hwirq and hwirq_base. Change it so we use unsigned int everywhere.
Signed-off-by: David Daney <david.daney@cavium.com>
---
arch/arm/common/gic.c | 2 +-
include/linux/irqdomain.h | 6 +++---
kernel/irq/irqdomain.c | 8 ++++----
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
index b2dc2dd..171061f 100644
--- a/arch/arm/common/gic.c
+++ b/arch/arm/common/gic.c
@@ -625,7 +625,7 @@ static void __init gic_pm_init(struct gic_chip_data *gic)
static int gic_irq_domain_dt_translate(struct irq_domain *d,
struct device_node *controller,
const u32 *intspec, unsigned int intsize,
- unsigned long *out_hwirq, unsigned int *out_type)
+ unsigned int *out_hwirq, unsigned int *out_type)
{
if (d->of_node != controller)
return -EINVAL;
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index 0914a54..16ba5a9 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -31,12 +31,12 @@ struct irq_domain;
* the hardware irq number and linux irq type value.
*/
struct irq_domain_ops {
- unsigned int (*to_irq)(struct irq_domain *d, unsigned long hwirq);
+ unsigned int (*to_irq)(struct irq_domain *d, unsigned int hwirq);
#ifdef CONFIG_OF
int (*dt_translate)(struct irq_domain *d, struct device_node *node,
const u32 *intspec, unsigned int intsize,
- unsigned long *out_hwirq, unsigned int *out_type);
+ unsigned int *out_hwirq, unsigned int *out_type);
#endif /* CONFIG_OF */
};
@@ -72,7 +72,7 @@ struct irq_domain {
* be overridden if the irq_domain implements a .to_irq() hook.
*/
static inline unsigned int irq_domain_to_irq(struct irq_domain *d,
- unsigned long hwirq)
+ unsigned int hwirq)
{
if (d->ops->to_irq)
return d->ops->to_irq(d, hwirq);
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 200ce83..7bae422 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -20,7 +20,7 @@ static DEFINE_MUTEX(irq_domain_mutex);
void irq_domain_add(struct irq_domain *domain)
{
struct irq_data *d;
- int hwirq, irq;
+ unsigned int hwirq, irq;
/*
* This assumes that the irq_domain owner has already allocated
@@ -54,7 +54,7 @@ void irq_domain_add(struct irq_domain *domain)
void irq_domain_del(struct irq_domain *domain)
{
struct irq_data *d;
- int hwirq, irq;
+ unsigned int hwirq, irq;
mutex_lock(&irq_domain_mutex);
list_del(&domain->list);
@@ -82,7 +82,7 @@ unsigned int irq_create_of_mapping(struct device_node *controller,
const u32 *intspec, unsigned int intsize)
{
struct irq_domain *domain;
- unsigned long hwirq;
+ unsigned int hwirq;
unsigned int irq, type;
int rc = -EINVAL;
@@ -129,7 +129,7 @@ EXPORT_SYMBOL_GPL(irq_dispose_mapping);
int irq_domain_simple_dt_translate(struct irq_domain *d,
struct device_node *controller,
const u32 *intspec, unsigned int intsize,
- unsigned long *out_hwirq, unsigned int *out_type)
+ unsigned int *out_hwirq, unsigned int *out_type)
{
if (d->of_node != controller)
return -EINVAL;
--
1.7.2.3
next prev parent reply other threads:[~2011-12-15 2:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-15 2:32 [PATCH v2 0/4] irq/of: Cleanup and Enchance irq_domain support David Daney
2011-12-15 2:32 ` David Daney [this message]
2011-12-15 2:32 ` [PATCH v2 3/4] irq/of/ARM: Enhance irq iteration capability of irq_domain code David Daney
[not found] ` <1323916330-8865-1-git-send-email-ddaney.cavm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-12-15 2:32 ` [PATCH v2 1/4] irq: Get rid of irq_domain_for_each_hwirq() David Daney
2011-12-15 2:32 ` [PATCH v2 4/4] MIPS: Octeon: Add irq_create_of_mapping() and GPIO interrupts David Daney
2011-12-30 15:30 ` [PATCH v2 0/4] irq/of: Cleanup and Enchance irq_domain support Rob Herring
[not found] ` <4EFDD925.3050806-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-12-30 18:19 ` Grant Likely
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=1323916330-8865-3-git-send-email-ddaney.cavm@gmail.com \
--to=ddaney.cavm@gmail.com \
--cc=david.daney@cavium.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=rob.herring@calxeda.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).