]> Pileus Git - ~andy/linux/commitdiff
[IA64] simplify some condition checks in iosapic_check_gsi_range
authorSatoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Mon, 27 Mar 2006 08:13:46 +0000 (17:13 +0900)
committerTony Luck <tony.luck@intel.com>
Tue, 28 Mar 2006 18:42:15 +0000 (10:42 -0800)
Some condition checks on iosapic_check_gsi_range() can be omitted
because always `base <= end' is assured. This patch simplifies those
checks.

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/iosapic.c

index 22d845f85366931136bbcba5f913daace12f33ac..7956eb9058fcb873a65b5889d66f6eb6208e4c76 100644 (file)
@@ -1063,10 +1063,7 @@ iosapic_check_gsi_range (unsigned int gsi_base, unsigned int ver)
                base = iosapic_lists[index].gsi_base;
                end  = base + iosapic_lists[index].num_rte - 1;
 
-               if (gsi_base < base && gsi_end < base)
-                       continue;/* OK */
-
-               if (gsi_base > end && gsi_end > end)
+               if (gsi_end < base || end < gsi_base)
                        continue; /* OK */
 
                return -EBUSY;