Skip to contentSkip to conversation

fs/ntfs3: Remove unused function wnd_bits

PATCH Applied Jiapeng Chong 2 participants 2 messages Jul 21, 2022 – Aug 10, 2022 NTFS3 filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/ntfs3: Remove unused function wnd_bits

Since the function wnd_bits is defined but not called in any file, it is a useless function, and we delete it in view of the brevity of the code.

Remove some warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'.

fs/ntfs3/bitmap.c:54:19: warning: unused function 'wnd_bits' [-Wunused-function].

---
 fs/ntfs3/bitmap.c | 5 -----
 1 file changed, 5 deletions(-)
fs/ntfs3/bitmap.c +0 -5
index e3b5680fd516..177c5bc53373 100644
@@ -51,11 +51,6 @@ void ntfs3_exit_bitmap(void)
 	kmem_cache_destroy(ntfs_enode_cachep);
 }
 
-static inline u32 wnd_bits(const struct wnd_bitmap *wnd, size_t i)
-{
-	return i + 1 == wnd->nwnd ? wnd->bits_last : wnd->sb->s_blocksize * 8;
-}
-
 /*
  * wnd_scan
  *
Signature · 1 line
2.20.1.7.g153144c
maintainer Applied
#1 lore raw
Quoted 20 lines · Jiapeng Chong

Since the function wnd_bits is defined but not called in any file, it is a useless function, and we delete it in view of the brevity of the code.

Remove some warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'.

fs/ntfs3/bitmap.c:54:19: warning: unused function 'wnd_bits' [-Wunused-function].

---
  fs/ntfs3/bitmap.c | 5 -----
  1 file changed, 5 deletions(-)
fs/ntfs3/bitmap.c +0 -0
index e3b5680fd516..177c5bc53373 100644
@@ -51,11 +51,6 @@ void ntfs3_exit_bitmap(void)
  	kmem_cache_destroy(ntfs_enode_cachep);

fs/ntfs3/bitmap.c void ntfs3_exit_bitmap(void) · line 56

Quoted 10 lines
fs/ntfs3/bitmap.c +0 -5
  }
 
-static inline u32 wnd_bits(const struct wnd_bitmap *wnd, size_t i)
-{
-	return i + 1 == wnd->nwnd ? wnd->bits_last : wnd->sb->s_blocksize * 8;
-}
-
  /*
   * wnd_scan
   *

Applied, thanks!