Re: [PATCH] xfs: Remove the redundant assignment

From: Dave Chinner
Date: Fri May 20 2022 - 00:37:48 EST


On Fri, May 20, 2022 at 12:05:18PM +0800, Jiapeng Chong wrote:
> Variable 'ifree','freeblks' and 'itotal' set but not used.
>
> Eliminate the follow clang warning:
>
> fs/xfs/xfs_log_recover.c:3534:12: warning: variable 'freeblks' set but
> not used [-Wunused-but-set-variable].
>
> fs/xfs/xfs_log_recover.c:3535:12: warning: variable 'itotal' set but not
> used [-Wunused-but-set-variable].
>
> fs/xfs/xfs_log_recover.c:3536:12: warning: variable 'ifree'
> set but not used [-Wunused-but-set-variable].
>
> Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx>

Looks like it's been that way since 2010 - commit 1414a6046ab4
("xfs: remove dead XFS_LOUD_RECOVERY code") removed the prints that
dumped the differences between the in memory counters and the
calculated values....

IOWs, this entire function is dead code and has been for 12 years
now. Can you just remove it, please?

Cheers,

Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx