[PATCH 2.6] clean-up: fixes "unsigned<0" warning

From: Riina Kikas
Date: Mon Dec 06 2004 - 15:46:18 EST


This patch fixes 5 warnings "comparison of unsigned expression < 0 is
always false" occuring on lines 1987, 1988, 1989, 1990, 1992

Signed-off-by: Riina Kikas <Riina.Kikas@xxxxxxx>

--- a/drivers/block/as-iosched.c 2004-11-30 19:43:52.000000000 +0000
+++ b/drivers/block/as-iosched.c 2004-10-31 13:09:19.000000000 +0000
@@ -1974,23 +1974,21 @@
SHOW_FUNCTION(as_write_batchexpire_show, ad->batch_expire[REQ_ASYNC]);
#undef SHOW_FUNCTION

-#define STORE_FUNCTION(__FUNC, __PTR, MIN, MAX) \
+#define STORE_FUNCTION(__FUNC, __PTR, MAX) \
static ssize_t __FUNC(struct as_data *ad, const char *page, size_t count) \
{ \
int ret = as_var_store(__PTR, (page), count); \
- if (*(__PTR) < (MIN)) \
- *(__PTR) = (MIN); \
- else if (*(__PTR) > (MAX)) \
+ if (*(__PTR) > (MAX)) \
*(__PTR) = (MAX); \
return ret; \
}
-STORE_FUNCTION(as_readexpire_store, &ad->fifo_expire[REQ_SYNC], 0, INT_MAX);
-STORE_FUNCTION(as_writeexpire_store, &ad->fifo_expire[REQ_ASYNC], 0, INT_MAX);
-STORE_FUNCTION(as_anticexpire_store, &ad->antic_expire, 0, INT_MAX);
+STORE_FUNCTION(as_readexpire_store, &ad->fifo_expire[REQ_SYNC], INT_MAX);
+STORE_FUNCTION(as_writeexpire_store, &ad->fifo_expire[REQ_ASYNC], INT_MAX);
+STORE_FUNCTION(as_anticexpire_store, &ad->antic_expire, INT_MAX);
STORE_FUNCTION(as_read_batchexpire_store,
- &ad->batch_expire[REQ_SYNC], 0, INT_MAX);
+ &ad->batch_expire[REQ_SYNC], INT_MAX);
STORE_FUNCTION(as_write_batchexpire_store,
- &ad->batch_expire[REQ_ASYNC], 0, INT_MAX);
+ &ad->batch_expire[REQ_ASYNC], INT_MAX);
#undef STORE_FUNCTION

static struct as_fs_entry as_est_entry = {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/