All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] xfs: Remove redundant assignment of mp
@ 2022-01-05 15:15 Jiapeng Chong
  2022-01-05 19:11 ` Darrick J. Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2022-01-05 15:15 UTC (permalink / raw)
  To: djwong; +Cc: linux-xfs, linux-kernel, Jiapeng Chong, Abaci Robot

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@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] xfs: Remove redundant assignment of mp
  2022-01-05 15:15 [PATCH v2] xfs: Remove redundant assignment of mp Jiapeng Chong
@ 2022-01-05 19:11 ` Darrick J. Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2022-01-05 19:11 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: linux-xfs, linux-kernel, Abaci Robot

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@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Much improved, thank you.
Reviewed-by: Darrick J. Wong <djwong@kernel.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
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-05 19:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-05 15:15 [PATCH v2] xfs: Remove redundant assignment of mp Jiapeng Chong
2022-01-05 19:11 ` Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.