Commit 9687a60c authored by Andre Noll's avatar Andre Noll Committed by Neil Brown

md: sync_speed_show(): Trivial cleanups.

- Remove superfluous parentheses.
- Make format string match the type of the variable that is printed.
Signed-off-by: default avatarAndre Noll <maan@systemlinux.org>
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
parent 13e53df3
...@@ -3168,11 +3168,11 @@ static ssize_t ...@@ -3168,11 +3168,11 @@ static ssize_t
sync_speed_show(mddev_t *mddev, char *page) sync_speed_show(mddev_t *mddev, char *page)
{ {
unsigned long resync, dt, db; unsigned long resync, dt, db;
resync = (mddev->curr_mark_cnt - atomic_read(&mddev->recovery_active)); resync = mddev->curr_mark_cnt - atomic_read(&mddev->recovery_active);
dt = ((jiffies - mddev->resync_mark) / HZ); dt = (jiffies - mddev->resync_mark) / HZ;
if (!dt) dt++; if (!dt) dt++;
db = resync - (mddev->resync_mark_cnt); db = resync - mddev->resync_mark_cnt;
return sprintf(page, "%ld\n", db/dt/2); /* K/sec */ return sprintf(page, "%lu\n", db/dt/2); /* K/sec */
} }
static struct md_sysfs_entry md_sync_speed = __ATTR_RO(sync_speed); static struct md_sysfs_entry md_sync_speed = __ATTR_RO(sync_speed);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment