From: Satoru Takeuchi Date: Mon, 27 Mar 2006 08:13:46 +0000 (+0900) Subject: [IA64] simplify some condition checks in iosapic_check_gsi_range X-Git-Tag: v2.6.17-rc1~148^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6d1ba5cd9954e7c15538aaef7585b235a69e0e1;p=linux-2.6 [IA64] simplify some condition checks in iosapic_check_gsi_range 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 Signed-off-by: Tony Luck --- diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index 22d845f853..7956eb9058 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c @@ -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;