md: sync_speed_show(): Trivial cleanups.
authorAndre Noll <maan@systemlinux.org>
Tue, 25 Mar 2008 21:24:09 +0000 (22:24 +0100)
committerNeil Brown <neilb@suse.de>
Tue, 8 Jul 2008 00:52:26 +0000 (10:52 +1000)
- Remove superfluous parentheses.
- Make format string match the type of the variable that is printed.

Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: Neil Brown <neilb@suse.de>
drivers/md/md.c

index b9d902652a519f2232961387de259cf6e480233f..8545818fb6d0379766f1b8a9408cd634b613fa81 100644 (file)
@@ -3168,11 +3168,11 @@ static ssize_t
 sync_speed_show(mddev_t *mddev, char *page)
 {
        unsigned long resync, dt, db;
-       resync = (mddev->curr_mark_cnt - atomic_read(&mddev->recovery_active));
-       dt = ((jiffies - mddev->resync_mark) / HZ);
+       resync = mddev->curr_mark_cnt - atomic_read(&mddev->recovery_active);
+       dt = (jiffies - mddev->resync_mark) / HZ;
        if (!dt) dt++;
-       db = resync - (mddev->resync_mark_cnt);
-       return sprintf(page, "%ld\n", db/dt/2); /* K/sec */
+       db = resync - mddev->resync_mark_cnt;
+       return sprintf(page, "%lu\n", db/dt/2); /* K/sec */
 }
 
 static struct md_sysfs_entry md_sync_speed = __ATTR_RO(sync_speed);