Whamcloud - gitweb
LU-5577 obdclass: change loop indexes to unsigned 87/12387/4
authorDmitry Eremin <dmitry.eremin@intel.com>
Mon, 13 Oct 2014 17:18:21 +0000 (21:18 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 5 Dec 2014 13:42:05 +0000 (13:42 +0000)
Cleanup warnings about comparison between signed and unsigned.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I2d94940251f639942142d54a561225daa8cd8a74
Reviewed-on: http://review.whamcloud.com/12387
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/obdclass/cl_io.c
lustre/obdclass/cl_object.c

index 94eae55..3279a76 100644 (file)
@@ -1344,7 +1344,7 @@ void cl_req_page_add(const struct lu_env *env,
 {
        struct cl_object  *obj;
        struct cl_req_obj *rqo;
 {
        struct cl_object  *obj;
        struct cl_req_obj *rqo;
-       int i;
+       unsigned int i;
 
        ENTRY;
 
 
        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 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;
 
         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;
 {
         const struct cl_req_slice *slice;
         struct cl_page            *page;
-        int i;
+       unsigned int i;
 
        LASSERT(!list_empty(&req->crq_pages));
         ENTRY;
 
        LASSERT(!list_empty(&req->crq_pages));
         ENTRY;
index de52f90..c37bcd0 100644 (file)
@@ -397,7 +397,7 @@ static void cl_env_percpu_refill(void);
  */
 int cl_site_init(struct cl_site *s, struct cl_device *d)
 {
  */
 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);
         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"
        };
                [CPS_PAGEIN]    = "r",
                [CPS_FREEING]   = "f"
        };
-       int i;
+       size_t i;
 
 /*
        lookup    hit  total   busy create
 
 /*
        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)) {
 
         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);
 
                 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)
 {
 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)
 
         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)
 {
 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);
 
         for (i = 0; i < ARRAY_SIZE(info->clt_counters); ++i) {
                 LASSERT(info->clt_counters[i].ctc_nr_held == 0);