diff options
author | Andre Noll <maan@systemlinux.org> | 2008-03-25 17:24:09 -0400 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2008-07-07 20:52:26 -0400 |
commit | 9687a60c78bbf5649d9acbde1e8818be4c8c8b94 (patch) | |
tree | df518b5c38d064c838e9304ceca5b2dbc9d4b903 /drivers/md/md.c | |
parent | 13e53df354caea8986df951dcb6353c823e1f858 (diff) |
md: sync_speed_show(): Trivial cleanups.
- 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>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index b9d902652a51..8545818fb6d0 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -3168,11 +3168,11 @@ static ssize_t | |||
3168 | sync_speed_show(mddev_t *mddev, char *page) | 3168 | sync_speed_show(mddev_t *mddev, char *page) |
3169 | { | 3169 | { |
3170 | unsigned long resync, dt, db; | 3170 | unsigned long resync, dt, db; |
3171 | resync = (mddev->curr_mark_cnt - atomic_read(&mddev->recovery_active)); | 3171 | resync = mddev->curr_mark_cnt - atomic_read(&mddev->recovery_active); |
3172 | dt = ((jiffies - mddev->resync_mark) / HZ); | 3172 | dt = (jiffies - mddev->resync_mark) / HZ; |
3173 | if (!dt) dt++; | 3173 | if (!dt) dt++; |
3174 | db = resync - (mddev->resync_mark_cnt); | 3174 | db = resync - mddev->resync_mark_cnt; |
3175 | return sprintf(page, "%ld\n", db/dt/2); /* K/sec */ | 3175 | return sprintf(page, "%lu\n", db/dt/2); /* K/sec */ |
3176 | } | 3176 | } |
3177 | 3177 | ||
3178 | static struct md_sysfs_entry md_sync_speed = __ATTR_RO(sync_speed); | 3178 | static struct md_sysfs_entry md_sync_speed = __ATTR_RO(sync_speed); |