public inbox for linux-bcache@vger.kernel.org
 help / color / mirror / Atom feed
From: Wang Hai <wanghai38@huawei.com>
To: colyli@suse.de, kent.overstreet@gmail.com
Cc: linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org,
	wanghai38@huawei.com
Subject: [PATCH] bcache: remove set but not used variable 'i'
Date: Mon, 6 Apr 2020 02:25:41 -0000 (UTC)
Date: Tue, 7 Apr 2020 07:36:47 -0400	[thread overview]
Message-ID: <1586259407-23673-1-git-send-email-wanghai38@huawei.com> (raw)

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/md/bcache/btree.c: In function bch_btree_check_thread:
drivers/md/bcache/btree.c:1910:6: warning:
 variable ‘i’ set but not used [-Wunused-but-set-variable]

It's not used since commit 8e7102273f59 ("bcache: make bch_btree_check()
to be multithreaded"), so remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
---
 drivers/md/bcache/btree.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
index 72856e5..b962313 100644
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -1907,10 +1907,10 @@ static int bch_btree_check_thread(void *arg)
 	struct btree_iter iter;
 	struct bkey *k, *p;
 	int cur_idx, prev_idx, skip_nr;
-	int i, n;
+	int n;
 
 	k = p = NULL;
-	i = n = 0;
+	n = 0;
 	cur_idx = prev_idx = 0;
 	ret = 0;
 
-- 
1.8.3.1

             reply	other threads:[~2020-04-06  2:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06  2:25 Wang Hai [this message]
2020-04-06  4:43 ` [PATCH] bcache: remove set but not used variable 'i' Coly Li
2020-04-06  6:39   ` wanghai (M)
  -- strict thread matches above, loose matches on Subject: below --
2020-04-06  2:25 Wang Hai

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=1586259407-23673-1-git-send-email-wanghai38@huawei.com \
    --to=wanghai38@huawei.com \
    --cc=colyli@suse.de \
    --cc=kent.overstreet@gmail.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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