lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220105191134.GK656707@magnolia>
Date:   Wed, 5 Jan 2022 11:11:34 -0800
From:   "Darrick J. Wong" <djwong@...nel.org>
To:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Cc:     linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org,
        Abaci Robot <abaci@...ux.alibaba.com>
Subject: Re: [PATCH v2] xfs: Remove redundant assignment of mp

On Wed, Jan 05, 2022 at 11:15:36PM +0800, Jiapeng Chong wrote:
> mp is being initialized to log->l_mp but this is never read
> as record is overwritten later on. Remove the redundant
> assignment.
> 
> Cleans up the following clang-analyzer warning:
> 
> fs/xfs/xfs_log_recover.c:3543:20: warning: Value stored to 'mp' during
> its initialization is never read [clang-analyzer-deadcode.DeadStores].
> 
> Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>

Much improved, thank you.
Reviewed-by: Darrick J. Wong <djwong@...nel.org>

--D

> ---
> Changes in v2:
>  -Remove mp = log->l_mp.
> 
>  fs/xfs/xfs_log_recover.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
> index 8ecb9a8567b7..96c997ed2ec8 100644
> --- a/fs/xfs/xfs_log_recover.c
> +++ b/fs/xfs/xfs_log_recover.c
> @@ -3550,8 +3550,6 @@ xlog_recover_check_summary(
>  	uint64_t		ifree;
>  	int			error;
>  
> -	mp = log->l_mp;
> -
>  	freeblks = 0LL;
>  	itotal = 0LL;
>  	ifree = 0LL;
> -- 
> 2.20.1.7.g153144c
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ