* [PATCH] bcache: remove redundant variables i and n
@ 2020-04-02 11:19 Colin King
2020-04-02 11:34 ` Coly Li
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2020-04-02 11:19 UTC (permalink / raw)
To: Coly Li, Kent Overstreet, linux-bcache; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variables i and n are being assigned but are never used. They are
redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/md/bcache/btree.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
index 72856e5f23a3..114d0d73d909 100644
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -1907,10 +1907,8 @@ 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;
k = p = NULL;
- i = n = 0;
cur_idx = prev_idx = 0;
ret = 0;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bcache: remove redundant variables i and n
2020-04-02 11:19 [PATCH] bcache: remove redundant variables i and n Colin King
@ 2020-04-02 11:34 ` Coly Li
0 siblings, 0 replies; 2+ messages in thread
From: Coly Li @ 2020-04-02 11:34 UTC (permalink / raw)
To: Colin King; +Cc: Kent Overstreet, linux-bcache, kernel-janitors, linux-kernel
On 2020/4/2 7:19 下午, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variables i and n are being assigned but are never used. They are
> redundant and can be removed.
>
Hi Colin,
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Thanks, I will submit this patch in Linux 5.7-rc series.
> ---
> drivers/md/bcache/btree.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
> index 72856e5f23a3..114d0d73d909 100644
> --- a/drivers/md/bcache/btree.c
> +++ b/drivers/md/bcache/btree.c
> @@ -1907,10 +1907,8 @@ 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;
>
> k = p = NULL;
> - i = n = 0;
> cur_idx = prev_idx = 0;
> ret = 0;
>
>
--
Coly Li
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-02 11:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02 11:19 [PATCH] bcache: remove redundant variables i and n Colin King
2020-04-02 11:34 ` Coly Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).