diff mbox series

[4/5] xfs: remove unused is_rt_data_fork() function

Message ID 20240402213541.1199959-5-david@fromorbit.com (mailing list archive)
State New
Headers show
Series xfs: sparse warning fixes | expand

Commit Message

Dave Chinner April 2, 2024, 9:28 p.m. UTC
From: Dave Chinner <dchinner@redhat.com>

Sparse warns that is_rt_data_fork() is unused. Indeed, it is a
static inline function that isn't used in the file it is defined in.
It looks like xfs_ifork_is_realtime() has superceded this function,
so remove it and get rid of the sparse warning.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
 fs/xfs/scrub/rmap_repair.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Darrick J. Wong April 3, 2024, 3:54 a.m. UTC | #1
On Wed, Apr 03, 2024 at 08:28:31AM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> Sparse warns that is_rt_data_fork() is unused. Indeed, it is a
> static inline function that isn't used in the file it is defined in.
> It looks like xfs_ifork_is_realtime() has superceded this function,
> so remove it and get rid of the sparse warning.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>

Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  fs/xfs/scrub/rmap_repair.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/fs/xfs/scrub/rmap_repair.c b/fs/xfs/scrub/rmap_repair.c
> index e8e07b683eab..7e73ddfb3d44 100644
> --- a/fs/xfs/scrub/rmap_repair.c
> +++ b/fs/xfs/scrub/rmap_repair.c
> @@ -432,14 +432,6 @@ xrep_rmap_scan_iroot_btree(
>  	return error;
>  }
>  
> -static inline bool
> -is_rt_data_fork(
> -	struct xfs_inode	*ip,
> -	int			whichfork)
> -{
> -	return XFS_IS_REALTIME_INODE(ip) && whichfork == XFS_DATA_FORK;
> -}
> -
>  /*
>   * Iterate the block mapping btree to collect rmap records for anything in this
>   * fork that matches the AG.  Sets @mappings_done to true if we've scanned the
> -- 
> 2.43.0
> 
>
Christoph Hellwig April 3, 2024, 4:35 a.m. UTC | #2
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/fs/xfs/scrub/rmap_repair.c b/fs/xfs/scrub/rmap_repair.c
index e8e07b683eab..7e73ddfb3d44 100644
--- a/fs/xfs/scrub/rmap_repair.c
+++ b/fs/xfs/scrub/rmap_repair.c
@@ -432,14 +432,6 @@  xrep_rmap_scan_iroot_btree(
 	return error;
 }
 
-static inline bool
-is_rt_data_fork(
-	struct xfs_inode	*ip,
-	int			whichfork)
-{
-	return XFS_IS_REALTIME_INODE(ip) && whichfork == XFS_DATA_FORK;
-}
-
 /*
  * Iterate the block mapping btree to collect rmap records for anything in this
  * fork that matches the AG.  Sets @mappings_done to true if we've scanned the