diff mbox series

btrfs: Remove some unused functions

Message ID 20230913094327.98852-1-jiapeng.chong@linux.alibaba.com (mailing list archive)
State New, archived
Headers show
Series btrfs: Remove some unused functions | expand

Commit Message

Jiapeng Chong Sept. 13, 2023, 9:43 a.m. UTC
These functions are defined in the qgroup.c file, but not called
elsewhere, so delete these unused functions.

fs/btrfs/qgroup.c:149:19: warning: unused function 'qgroup_to_aux'.
fs/btrfs/qgroup.c:154:36: warning: unused function 'unode_aux_to_qgroup'.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6566
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 fs/btrfs/qgroup.c | 10 ----------
 1 file changed, 10 deletions(-)

Comments

Johannes Thumshirn Sept. 13, 2023, 10:05 a.m. UTC | #1
On 13.09.23 11:44, Jiapeng Chong wrote:
> These functions are defined in the qgroup.c file, but not called
> elsewhere, so delete these unused functions.

anywhere

> fs/btrfs/qgroup.c:149:19: warning: unused function 'qgroup_to_aux'
> fs/btrfs/qgroup.c:154:36: warning: unused function 'unode_aux_to_qgroup'.

The last user of them is gone since:

d852a91a696a ("btrfs: qgroup: use qgroup_iterator_nested to in 
qgroup_update_refcnt()")


Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
David Sterba Sept. 13, 2023, 11:30 a.m. UTC | #2
On Wed, Sep 13, 2023 at 05:43:27PM +0800, Jiapeng Chong wrote:
> These functions are defined in the qgroup.c file, but not called
> elsewhere, so delete these unused functions.
> 
> fs/btrfs/qgroup.c:149:19: warning: unused function 'qgroup_to_aux'.
> fs/btrfs/qgroup.c:154:36: warning: unused function 'unode_aux_to_qgroup'.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6566
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Added to misc-next with some wording adjusments and reference to the
patch that removed the last use, thanks.
diff mbox series

Patch

diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index a51f1ceb867a..d977c4f109fc 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -146,16 +146,6 @@  struct btrfs_qgroup_list {
 	struct btrfs_qgroup *member;
 };
 
-static inline u64 qgroup_to_aux(struct btrfs_qgroup *qg)
-{
-	return (u64)(uintptr_t)qg;
-}
-
-static inline struct btrfs_qgroup* unode_aux_to_qgroup(struct ulist_node *n)
-{
-	return (struct btrfs_qgroup *)(uintptr_t)n->aux;
-}
-
 static int
 qgroup_rescan_init(struct btrfs_fs_info *fs_info, u64 progress_objectid,
 		   int init_flags);