From c1352f54dba21d36581001043f7182f561c87f95 Mon Sep 17 00:00:00 2001 From: Dmitry Eremin Date: Mon, 13 Oct 2014 21:18:21 +0400 Subject: [PATCH] LU-5577 obdclass: change loop indexes to unsigned Cleanup warnings about comparison between signed and unsigned. Signed-off-by: Dmitry Eremin Change-Id: I2d94940251f639942142d54a561225daa8cd8a74 Reviewed-on: http://review.whamcloud.com/12387 Tested-by: Jenkins Reviewed-by: Bob Glossman Reviewed-by: John L. Hammond Tested-by: Maloo Reviewed-by: Jinshan Xiong Reviewed-by: Oleg Drokin --- lustre/obdclass/cl_io.c | 6 +++--- lustre/obdclass/cl_object.c | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lustre/obdclass/cl_io.c b/lustre/obdclass/cl_io.c index 94eae55..3279a76 100644 --- a/lustre/obdclass/cl_io.c +++ b/lustre/obdclass/cl_io.c @@ -1344,7 +1344,7 @@ void cl_req_page_add(const struct lu_env *env, { struct cl_object *obj; struct cl_req_obj *rqo; - int i; + unsigned int i; ENTRY; @@ -1397,7 +1397,7 @@ EXPORT_SYMBOL(cl_req_page_done); */ int cl_req_prep(const struct lu_env *env, struct cl_req *req) { - int i; + unsigned int i; int result; const struct cl_req_slice *slice; @@ -1431,7 +1431,7 @@ void cl_req_attr_set(const struct lu_env *env, struct cl_req *req, { const struct cl_req_slice *slice; struct cl_page *page; - int i; + unsigned int i; LASSERT(!list_empty(&req->crq_pages)); ENTRY; diff --git a/lustre/obdclass/cl_object.c b/lustre/obdclass/cl_object.c index de52f90..c37bcd0 100644 --- a/lustre/obdclass/cl_object.c +++ b/lustre/obdclass/cl_object.c @@ -397,7 +397,7 @@ static void cl_env_percpu_refill(void); */ int cl_site_init(struct cl_site *s, struct cl_device *d) { - int i; + size_t i; int result; result = lu_site_init(&s->cs_lu, &d->cd_lu_dev); @@ -438,7 +438,7 @@ int cl_site_stats_print(const struct cl_site *site, struct seq_file *m) [CPS_PAGEIN] = "r", [CPS_FREEING] = "f" }; - int i; + size_t i; /* lookup hit total busy create @@ -1218,7 +1218,7 @@ static void *cl_key_init(const struct lu_context *ctx, info = cl0_key_init(ctx, key); if (!IS_ERR(info)) { - int i; + size_t i; for (i = 0; i < ARRAY_SIZE(info->clt_counters); ++i) lu_ref_init(&info->clt_counters[i].ctc_locks_locked); @@ -1229,8 +1229,8 @@ static void *cl_key_init(const struct lu_context *ctx, static void cl_key_fini(const struct lu_context *ctx, struct lu_context_key *key, void *data) { - struct cl_thread_info *info; - int i; + struct cl_thread_info *info; + size_t i; info = data; for (i = 0; i < ARRAY_SIZE(info->clt_counters); ++i) @@ -1241,8 +1241,8 @@ static void cl_key_fini(const struct lu_context *ctx, static void cl_key_exit(const struct lu_context *ctx, struct lu_context_key *key, void *data) { - struct cl_thread_info *info = data; - int i; + struct cl_thread_info *info = data; + size_t i; for (i = 0; i < ARRAY_SIZE(info->clt_counters); ++i) { LASSERT(info->clt_counters[i].ctc_nr_held == 0); -- 1.8.3.1