From: Coly Li <colyli@suse.de>
To: Wang Hai <wanghai38@huawei.com>, kent.overstreet@gmail.com
Cc: linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bcache: remove set but not used variable 'i'
Date: Mon, 6 Apr 2020 12:43:08 +0800 [thread overview]
Message-ID: <dee5c875-4b4e-c425-ec8d-35e7599c4f5f@suse.de> (raw)
In-Reply-To: <1586259407-23673-1-git-send-email-wanghai38@huawei.com>
On 2020/4/7 7:36 下午, Wang Hai wrote:
> 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>
Hi Hai,
Colin King already submitted a similar patch on Apr 2 to fix it.
Thanks.
Coly Li
> ---
> 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;
>
>
next prev parent reply other threads:[~2020-04-06 4:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-06 2:25 [PATCH] bcache: remove set but not used variable 'i' Wang Hai
2020-04-06 4:43 ` Coly Li [this message]
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=dee5c875-4b4e-c425-ec8d-35e7599c4f5f@suse.de \
--to=colyli@suse.de \
--cc=kent.overstreet@gmail.com \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wanghai38@huawei.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