From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Grant Likely <grant.likely@linaro.org>,
Rob Herring <robh@kernel.org>, Michal Simek <monstr@monstr.eu>,
Tony Lindgren <tony@atomide.com>,
linux-kernel@vger.kernel.org
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Subject: [PATCH] x86/devicetree: Fix compile warnings on AMD64
Date: Tue, 5 Aug 2014 11:19:48 +0200 [thread overview]
Message-ID: <1407230388-14211-1-git-send-email-ricardo.ribalda@gmail.com> (raw)
arch/x86/kernel/devicetree.c: In function ‘ioapic_xlate’:
arch/x86/kernel/devicetree.c:294:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
idx = (__force u32) domain->host_data;
^
arch/x86/kernel/devicetree.c: In function ‘dt_add_ioapic_domain’:
arch/x86/kernel/devicetree.c:323:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
(void *)ioapic_num);
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
arch/x86/kernel/devicetree.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index 7db54b5..a481d1b 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -278,7 +278,8 @@ static int ioapic_xlate(struct irq_domain *domain,
{
struct io_apic_irq_attr attr;
struct of_ioapic_type *it;
- u32 line, idx;
+ u32 line;
+ unsigned long idx;
int rc;
if (WARN_ON(intsize < 2))
@@ -291,7 +292,7 @@ static int ioapic_xlate(struct irq_domain *domain,
it = &of_ioapic_type[intspec[1]];
- idx = (u32) domain->host_data;
+ idx = (unsigned long) domain->host_data;
set_io_apic_irq_attr(&attr, idx, line, it->trigger, it->polarity);
rc = io_apic_setup_irq_pin_once(irq_find_mapping(domain, line),
@@ -320,7 +321,7 @@ static void dt_add_ioapic_domain(unsigned int ioapic_num,
num = gsi_cfg->gsi_end - gsi_cfg->gsi_base + 1;
id = irq_domain_add_linear(np, num, &ioapic_irq_domain_ops,
- (void *)ioapic_num);
+ (void *)((unsigned long)ioapic_num));
BUG_ON(!id);
if (gsi_cfg->gsi_base == 0) {
/*
--
2.0.1
reply other threads:[~2014-08-05 9:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1407230388-14211-1-git-send-email-ricardo.ribalda@gmail.com \
--to=ricardo.ribalda@gmail.com \
--cc=grant.likely@linaro.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=monstr@monstr.eu \
--cc=robh@kernel.org \
--cc=tglx@linutronix.de \
--cc=tony@atomide.com \
--cc=x86@kernel.org \
/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®