linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] ext2: remove redundant assignment to variable desc
@ 2023-06-30 16:30 Colin Ian King
  2023-06-30 16:47 ` Dan Carpenter
  2023-06-30 19:14 ` kernel test robot
  0 siblings, 2 replies; 4+ messages in thread
From: Colin Ian King @ 2023-06-30 16:30 UTC (permalink / raw)
  To: Jan Kara, linux-ext4; +Cc: kernel-janitors, linux-kernel

Variable desc is being assigned a value that is never read, the exit
via label found immeditely returns with no access to desc. The
assignment is redundant and can be removed. Cleans up clang scan
muild warning:

fs/ext2/ialloc.c:297:4: warning: Value stored to 'desc' is never
read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 fs/ext2/ialloc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
index a4e1d7a9c544..f50beb77d6ba 100644
--- a/fs/ext2/ialloc.c
+++ b/fs/ext2/ialloc.c
@@ -294,7 +294,6 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent)
 			best_desc = desc;
 		}
 		if (best_group >= 0) {
-			desc = best_desc;
 			group = best_group;
 			goto found;
 		}
-- 
2.39.2


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

end of thread, other threads:[~2023-06-30 19:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-30 16:30 [PATCH][next] ext2: remove redundant assignment to variable desc Colin Ian King
2023-06-30 16:47 ` Dan Carpenter
2023-06-30 16:53   ` Colin King (gmail)
2023-06-30 19:14 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).