lkml.org 
[lkml]   [2014]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] microblaze: intc: Refactor DT sanity check
Date
Avoid funky casts and arithmetic.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
---
arch/microblaze/kernel/intc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/microblaze/kernel/intc.c b/arch/microblaze/kernel/intc.c
index 01ae73088578..8965fd379570 100644
--- a/arch/microblaze/kernel/intc.c
+++ b/arch/microblaze/kernel/intc.c
@@ -157,7 +157,7 @@ static int __init xilinx_intc_of_init(struct device_node *intc,
return ret;
}

- if (intr_mask > (u32)((1ULL << nr_irq) - 1))
+ if (intr_mask >> nr_irq)
pr_info(" ERROR: Mismatch in kind-of-intr param\n");

pr_info("%s: num_irq=%d, edge=0x%x\n",
--
2.2.0.1.g9ee0458


\
 
 \ /
  Last update: 2014-12-19 20:01    [W:0.049 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site