lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1407230388-14211-1-git-send-email-ricardo.ribalda@gmail.com>
Date:	Tue,  5 Aug 2014 11:19:48 +0200
From:	Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
To:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh@...nel.org>, Michal Simek <monstr@...str.eu>,
	Tony Lindgren <tony@...mide.com>, linux-kernel@...r.kernel.org
Cc:	Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
Subject: [PATCH] x86/devicetree: Fix compile warnings on AMD64

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@...il.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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ