]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
btrfs: heuristic: call get4bits directly
authorDavid Sterba <dsterba@suse.com>
Tue, 12 Dec 2017 19:35:02 +0000 (20:35 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:19 +0000 (16:08 +0100)
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>
fs/btrfs/compression.c

index 935acabc0ea7cc8fcd76b0dc8a5f8fe03296d79c..208334aa6c6ee9911f5ae0d0f87e0c993454db15 100644 (file)
@@ -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;