linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wang Ming <machel@vivo.com>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com, Wang Ming <machel@vivo.com>
Subject: [PATCH v1] lib:Remove repeated initialization
Date: Thu,  6 Jul 2023 22:03:01 +0800	[thread overview]
Message-ID: <20230706140314.9999-1-machel@vivo.com> (raw)

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



             reply	other threads:[~2023-07-06 14:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06 14:03 Wang Ming [this message]
2023-07-06 14:45 ` Matthew Wilcox
2023-07-06 19:42 ` [PATCH] lib: Remove repeated “initialization” in check_state_handling() Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230706140314.9999-1-machel@vivo.com \
    --to=machel@vivo.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=opensource.kernel@vivo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox