[PATCH] ia64: Fix tests on unsigned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



struct ate_resource member lowest_free_index is unsigned,
the test was invalid.

Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
---
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_ate.c b/arch/ia64/sn/pci/pcibr/pcibr_ate.c
index 5bc34ea..12a5a9c 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_ate.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_ate.c
@@ -70,8 +70,7 @@ static inline void free_ate_resource(struct ate_resource *ate_resource,
 				     int start)
 {
 	mark_ate(ate_resource, start, ate_resource->ate[start], 0);
-	if ((ate_resource->lowest_free_index > start) ||
-	    (ate_resource->lowest_free_index < 0))
+	if (ate_resource->lowest_free_index > start)
 		ate_resource->lowest_free_index = start;
 }
 
@@ -86,7 +85,7 @@ static inline int alloc_ate_resource(struct ate_resource *ate_resource,
 	/*
 	 * Check for ate exhaustion.
 	 */
-	if (ate_resource->lowest_free_index < 0)
+	if (ate_resource->lowest_free_index == -1)
 		return -1;
 
 	/*
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Sparc Linux]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux x86_64]     [Linux for Ham Radio]

  Powered by Linux