diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c index b02ee0b0dd552dbc60ddd67d9c5c7fe234e186b5..a9f9c77e889faaca728597bd516c4afc0f17982a 100644 --- a/drivers/scsi/myrs.c +++ b/drivers/scsi/myrs.c @@ -1978,7 +1978,8 @@ myrs_get_resync(struct device *dev) struct scsi_device *sdev = to_scsi_device(dev); struct myrs_hba *cs = shost_priv(sdev->host); struct myrs_ldev_info *ldev_info = sdev->hostdata; - u8 percent_complete = 0, status; + u64 percent_complete = 0; + u8 status; if (sdev->channel < cs->ctlr_info->physchan_present || !ldev_info) return; @@ -1986,8 +1987,8 @@ myrs_get_resync(struct device *dev) unsigned short ldev_num = ldev_info->ldev_num; status = myrs_get_ldev_info(cs, ldev_num, ldev_info); - percent_complete = ldev_info->rbld_lba * 100 / - ldev_info->cfg_devsize; + percent_complete = ldev_info->rbld_lba * 100; + do_div(percent_complete, ldev_info->cfg_devsize); } raid_set_resync(myrs_raid_template, dev, percent_complete); }