diff mbox

[4/5] btrfs-progs: Remove a unused function offset_to_bitmap()

Message ID 1418969592-21278-5-git-send-email-quwenruo@cn.fujitsu.com (mailing list archive)
State Accepted
Headers show

Commit Message

Qu Wenruo Dec. 19, 2014, 6:13 a.m. UTC
Fix the following clang warning:

free-space-cache.c:464:19: warning: unused function 'offset_to_bitmap'
[-Wunused-function]
static inline u64 offset_to_bitmap(struct btrfs_free_space_ctl *ctl,
                  ^
1 warning generated.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
 free-space-cache.c | 16 ----------------
 1 file changed, 16 deletions(-)
diff mbox

Patch

diff --git a/free-space-cache.c b/free-space-cache.c
index 220449e..99ad420 100644
--- a/free-space-cache.c
+++ b/free-space-cache.c
@@ -461,22 +461,6 @@  static inline unsigned long bytes_to_bits(u64 bytes, u32 unit)
 	return (unsigned long)(bytes / unit);
 }
 
-static inline u64 offset_to_bitmap(struct btrfs_free_space_ctl *ctl,
-				   u64 offset)
-{
-	u64 bitmap_start;
-	u64 bytes_per_bitmap;
-	u32 sectorsize = ctl->sectorsize;
-
-	bytes_per_bitmap = BITS_PER_BITMAP(sectorsize) * ctl->unit;
-	bitmap_start = offset - ctl->start;
-	bitmap_start = bitmap_start / bytes_per_bitmap;
-	bitmap_start *= bytes_per_bitmap;
-	bitmap_start += ctl->start;
-
-	return bitmap_start;
-}
-
 static int tree_insert_offset(struct rb_root *root, u64 offset,
 			      struct rb_node *node, int bitmap)
 {