All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext4: Remove redundant assignment to error
@ 2021-04-29 10:16 Jiapeng Chong
  2021-06-16 23:30 ` Theodore Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-04-29 10:16 UTC (permalink / raw)
  To: tytso; +Cc: adilger.kernel, linux-ext4, linux-kernel, Jiapeng Chong

Variable error is set to zero but this value is never read as it's not
used later on, hence it is a redundant assignment and can be removed.

Cleans up the following clang-analyzer warning:

fs/ext4/ioctl.c:657:3: warning: Value stored to 'error' 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>
---
 fs/ext4/ioctl.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index e9b0a1f..796dcee 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -654,7 +654,6 @@ static int ext4_ioc_getfsmap(struct super_block *sb,
 	info.gi_data = arg;
 	error = ext4_getfsmap(sb, &xhead, ext4_getfsmap_format, &info);
 	if (error == EXT4_QUERY_RANGE_ABORT) {
-		error = 0;
 		aborted = true;
 	} else if (error)
 		return error;
-- 
1.8.3.1


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

* Re: [PATCH] ext4: Remove redundant assignment to error
  2021-04-29 10:16 [PATCH] ext4: Remove redundant assignment to error Jiapeng Chong
@ 2021-06-16 23:30 ` Theodore Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2021-06-16 23:30 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: adilger.kernel, linux-ext4, linux-kernel

On Thu, Apr 29, 2021 at 06:16:49PM +0800, Jiapeng Chong wrote:
> Variable error is set to zero but this value is never read as it's not
> used later on, hence it is a redundant assignment and can be removed.
> 
> Cleans up the following clang-analyzer warning:
> 
> fs/ext4/ioctl.c:657:3: warning: Value stored to 'error' 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>

Applied, thanks.

					- Ted

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

end of thread, other threads:[~2021-06-16 23:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 10:16 [PATCH] ext4: Remove redundant assignment to error Jiapeng Chong
2021-06-16 23:30 ` Theodore Ts'o

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.