Re: [PATCH][V2] xfs: remove redundant pointer lip

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 10, 2022 at 05:05:15PM +0100, Colin Ian King wrote:
> The assignment to pointer lip is not really required, the pointer lip
> is redundant and can be removed.
> 
> Cleans up clang-scan warning:
> warning: Although the value stored to 'lip' is used in the enclosing
> expression, the value is never actually read from 'lip'
> [deadcode.DeadStores]
> 
> Signed-off-by: Colin Ian King <colin.i.king@xxxxxxxxx>

Looks good!
Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>

--D

> ---
> 
> V2: Keep != NULL comparison for stylistic reasons, as suggested by
>     Darrick J. Wong
> ---
>  fs/xfs/xfs_trans_ail.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
> index 16fbf2a1144c..87db72758d1f 100644
> --- a/fs/xfs/xfs_trans_ail.c
> +++ b/fs/xfs/xfs_trans_ail.c
> @@ -730,11 +730,10 @@ void
>  xfs_ail_push_all_sync(
>  	struct xfs_ail  *ailp)
>  {
> -	struct xfs_log_item	*lip;
>  	DEFINE_WAIT(wait);
>  
>  	spin_lock(&ailp->ail_lock);
> -	while ((lip = xfs_ail_max(ailp)) != NULL) {
> +	while (xfs_ail_max(ailp) != NULL) {
>  		prepare_to_wait(&ailp->ail_empty, &wait, TASK_UNINTERRUPTIBLE);
>  		wake_up_process(ailp->ail_task);
>  		spin_unlock(&ailp->ail_lock);
> -- 
> 2.37.3
> 



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux