Commit 50d0446e authored by Seraphime Kirkovski's avatar Seraphime Kirkovski Committed by David Sterba

Btrfs: code cleanup min/max -> min_t/max_t

This cleans up the cases where the min/max macros were used with a cast
rather than using directly min_t/max_t.
Signed-off-by: default avatarSeraphime Kirkovski <kirkseraph@gmail.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 6b4df8b6
...@@ -856,8 +856,8 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans, ...@@ -856,8 +856,8 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
tmp = min(tmp, (next_offset - file_key.offset) >> tmp = min(tmp, (next_offset - file_key.offset) >>
fs_info->sb->s_blocksize_bits); fs_info->sb->s_blocksize_bits);
tmp = max((u64)1, tmp); tmp = max_t(u64, 1, tmp);
tmp = min(tmp, (u64)MAX_CSUM_ITEMS(fs_info, csum_size)); tmp = min_t(u64, tmp, MAX_CSUM_ITEMS(fs_info, csum_size));
ins_size = csum_size * tmp; ins_size = csum_size * tmp;
} else { } else {
ins_size = csum_size; ins_size = csum_size;
......
...@@ -395,7 +395,7 @@ static noinline int btrfs_ioctl_fitrim(struct file *file, void __user *arg) ...@@ -395,7 +395,7 @@ static noinline int btrfs_ioctl_fitrim(struct file *file, void __user *arg)
q = bdev_get_queue(device->bdev); q = bdev_get_queue(device->bdev);
if (blk_queue_discard(q)) { if (blk_queue_discard(q)) {
num_devices++; num_devices++;
minlen = min((u64)q->limits.discard_granularity, minlen = min_t(u64, q->limits.discard_granularity,
minlen); minlen);
} }
} }
......
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