* [PATCH] bcache: remove set but not used variable 'i'
@ 2020-04-06 2:25 Wang Hai
2020-04-06 4:43 ` Coly Li
0 siblings, 1 reply; 4+ messages in thread
From: Wang Hai @ 2020-04-06 2:25 UTC (permalink / raw)
To: colyli, kent.overstreet; +Cc: linux-bcache, linux-kernel, wanghai38
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
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] bcache: remove set but not used variable 'i'
2020-04-06 2:25 [PATCH] bcache: remove set but not used variable 'i' Wang Hai
@ 2020-04-06 4:43 ` Coly Li
2020-04-06 6:39 ` wanghai (M)
0 siblings, 1 reply; 4+ messages in thread
From: Coly Li @ 2020-04-06 4:43 UTC (permalink / raw)
To: Wang Hai, kent.overstreet; +Cc: linux-bcache, linux-kernel
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;
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] bcache: remove set but not used variable 'i'
2020-04-06 4:43 ` Coly Li
@ 2020-04-06 6:39 ` wanghai (M)
0 siblings, 0 replies; 4+ messages in thread
From: wanghai (M) @ 2020-04-06 6:39 UTC (permalink / raw)
To: Coly Li, kent.overstreet; +Cc: linux-bcache, linux-kernel
在 2020/4/6 12:43, Coly Li 写道:
> 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
Thanks for reminding, please ignore this patch.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] bcache: remove set but not used variable 'i'
@ 2020-04-06 2:25 Wang Hai
0 siblings, 0 replies; 4+ messages in thread
From: Wang Hai @ 2020-04-06 2:25 UTC (permalink / raw)
To: colyli, kent.overstreet; +Cc: linux-bcache, linux-kernel, wanghai38
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-04-06 6:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-06 2:25 [PATCH] bcache: remove set but not used variable 'i' Wang Hai
2020-04-06 4:43 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox