Remove code duplication in comp_keys
PATCH 1/1 Remove code duplication in comp_keys
comp_keys is duplicating what is done in btrfs_comp_cpu_keys, so just call it.
Signed-off-by Diego Calleja <[email protected]>
--- fs/btrfs/ctree.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)
fs/btrfs/ctree.c +1 -13
@@ -557,19 +557,7 @@ static int comp_keys(struct btrfs_disk_kbtrfs_disk_key_to_cpu (&k1, disk); -if (k1.objectid > k2->objectid) -return 1 ; -if (k1.objectid < k2->objectid) -return -1 ; -if (k1.type > k2->type) -return 1 ; -if (k1.type < k2->type) -return -1 ; -if (k1.offset > k2->offset) -return 1 ; -if (k1.offset < k2->offset) -return -1 ; -return 0 ; +return btrfs_comp_cpu_keys (&k1, k2); }/*
Quoted 2 lines · Diego Calleja
comp_keysis duplicating what is done inbtrfs_comp_cpu_keys, so just call it.
Ok, looks like gcc is doing the right thing and inlining properly so I've queued this one up.
-chris