Skip to content

Commit cc7c771

Browse files
committed
btrfs: remove unnecessary casts in printk
Long time ago the explicit casts were necessary for u64 but we don't need it. Remove casts where the type matches, leaving only cases that cast sector_t or loff_t. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent c842268 commit cc7c771

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

fs/btrfs/print-tree.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,7 @@ static void print_uuid_item(struct extent_buffer *l, unsigned long offset,
177177
__le64 subvol_id;
178178

179179
read_extent_buffer(l, &subvol_id, offset, sizeof(subvol_id));
180-
pr_info("\t\tsubvol_id %llu\n",
181-
(unsigned long long)le64_to_cpu(subvol_id));
180+
pr_info("\t\tsubvol_id %llu\n", le64_to_cpu(subvol_id));
182181
item_size -= sizeof(u64);
183182
offset += sizeof(u64);
184183
}

fs/btrfs/ref-verify.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,8 +799,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info,
799799
if (!be) {
800800
btrfs_err(fs_info,
801801
"trying to do action %d to bytenr %llu num_bytes %llu but there is no existing entry!",
802-
action, (unsigned long long)bytenr,
803-
(unsigned long long)num_bytes);
802+
action, bytenr, num_bytes);
804803
dump_ref_action(fs_info, ra);
805804
kfree(ref);
806805
kfree(ra);

fs/btrfs/uuid-tree.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ int btrfs_uuid_tree_add(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
129129
} else {
130130
btrfs_warn(fs_info,
131131
"insert uuid item failed %d (0x%016llx, 0x%016llx) type %u!",
132-
ret, (unsigned long long)key.objectid,
133-
(unsigned long long)key.offset, type);
132+
ret, key.objectid, key.offset, type);
134133
goto out;
135134
}
136135

0 commit comments

Comments
 (0)