summaryrefslogtreecommitdiff
path: root/fs/btrfs/compression.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-12-12 22:35:02 +0300
committerDavid Sterba <dsterba@suse.com>2018-01-22 18:08:19 +0300
commit36243c9199d6df63a0fbebd4fc49a1af21f3d8a8 (patch)
tree3a5e1eb3a04687125892f844d6f4b0d50dc7ac22 /fs/btrfs/compression.c
parent7add17befcfc0811b583e4c3c70849a3095f0080 (diff)
downloadlinux-36243c9199d6df63a0fbebd4fc49a1af21f3d8a8.tar.xz
btrfs: heuristic: call get4bits directly
As it's a single instance and local to the file, we don't need to pass it as an argument. Reviewed-by: Timofey Titovets <nefelim4ag@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/compression.c')
-rw-r--r--fs/btrfs/compression.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 935acabc0ea7..208334aa6c6e 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -1319,11 +1319,9 @@ static u8 get4bits(u64 num, int shift) {
* @array_buf - buffer array to store sorting results
* must be equal in size to @array
* @num - array size
- * @get4bits - function to get 4 bits from number at specified offset
*/
static void radix_sort(struct bucket_item *array, struct bucket_item *array_buf,
- int num,
- u8 (*get4bits)(u64 num, int shift))
+ int num)
{
u64 max_num;
u64 buf_num;
@@ -1427,7 +1425,7 @@ static int byte_core_set_size(struct heuristic_ws *ws)
struct bucket_item *bucket = ws->bucket;
/* Sort in reverse order */
- radix_sort(ws->bucket, ws->bucket_b, BUCKET_SIZE, get4bits);
+ radix_sort(ws->bucket, ws->bucket_b, BUCKET_SIZE);
for (i = 0; i < BYTE_CORE_SET_LOW; i++)
coreset_sum += bucket[i].count;