From: Dmitry Eremin Date: Sun, 18 Sep 2016 20:37:42 +0000 (-0400) Subject: staging: lustre: lmv: change type of lmv_obd->tgts_size to u32 X-Git-Tag: v4.9-rc1~119^2~460 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f32a692993dd6238b7261c2e1fe971ab3195b5b3;p=karo-tx-linux.git staging: lustre: lmv: change type of lmv_obd->tgts_size to u32 tgts_size is used as unsigned. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-on: http://review.whamcloud.com/11881 Reviewed-by: Fan Yong Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index 4b72fb9ebf59..27fb4d7b85af 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -435,7 +435,7 @@ struct lmv_obd { int max_def_cookiesize; int server_timeout; - int tgts_size; /* size of tgts array */ + u32 tgts_size; /* size of tgts array */ struct lmv_tgt_desc **tgts; struct obd_connect_data conn_data; diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index e1428cbf9d7a..8d9e3b811ddd 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -1353,10 +1353,10 @@ static int lmv_setup(struct obd_device *obd, struct lustre_cfg *lcfg) return -EINVAL; } - lmv->tgts = kcalloc(32, sizeof(*lmv->tgts), GFP_NOFS); + lmv->tgts_size = 32U; + lmv->tgts = kcalloc(lmv->tgts_size, sizeof(*lmv->tgts), GFP_NOFS); if (!lmv->tgts) return -ENOMEM; - lmv->tgts_size = 32; obd_str2uuid(&lmv->desc.ld_uuid, desc->ld_uuid.uuid); lmv->desc.ld_tgt_count = 0;