From: Soren Brinkmann Date: Fri, 19 Dec 2014 18:21:05 +0000 (-0800) Subject: microblaze: intc: Refactor DT sanity check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d50466c90724d5aae4d38a9a9bc163bea6f94098;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git microblaze: intc: Refactor DT sanity check Avoid funky casts and arithmetic. Signed-off-by: Soren Brinkmann Signed-off-by: Michal Simek --- 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",