linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] lib:Remove repeated initialization
@ 2023-07-06 14:03 Wang Ming
  2023-07-06 14:45 ` Matthew Wilcox
  2023-07-06 19:42 ` [PATCH] lib: Remove repeated “initialization” in check_state_handling() Markus Elfring
  0 siblings, 2 replies; 3+ messages in thread
From: Wang Ming @ 2023-07-06 14:03 UTC (permalink / raw)
  To: Liam R. Howlett, linux-mm, linux-kernel; +Cc: opensource.kernel, Wang Ming

The original code initializes 'entry' 
twice in line 3229 and 3232, which 
causes duplicate initialization issue.
To fix this, we remove the initialization
of 'entry' in line 3229.

Signed-off-by: Wang Ming <machel@vivo.com>
---
 lib/test_maple_tree.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/test_maple_tree.c b/lib/test_maple_tree.c
index 9f60e0c4cc8c..2ec14c310dad 100644
--- a/lib/test_maple_tree.c
+++ b/lib/test_maple_tree.c
@@ -3226,7 +3226,6 @@ static noinline void __init check_state_handling(struct maple_tree *mt)
 
 	/* next: none -> active, skip value at location */
 	mas_set(&mas, 0);
-	entry = mas_next(&mas, ULONG_MAX);
 	mas.node = MAS_NONE;
 	mas.offset = 0;
 	entry = mas_next(&mas, ULONG_MAX);
-- 
2.25.1



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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-06 14:03 [PATCH v1] lib:Remove repeated initialization Wang Ming
2023-07-06 14:45 ` Matthew Wilcox
2023-07-06 19:42 ` [PATCH] lib: Remove repeated “initialization” in check_state_handling() Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox