Skip to content

Commit

Permalink
[IA64] simplify some condition checks in iosapic_check_gsi_range
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Satoru Takeuchi authored and Tony Luck committed Mar 28, 2006
1 parent 46cba3d commit e6d1ba5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions arch/ia64/kernel/iosapic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e6d1ba5

Please sign in to comment.