lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <DFEED6F9-45FE-48BA-BE50-51B780846DE3@suse.de>
Date:   Tue, 25 Jul 2023 20:49:19 +0800
From:   Coly Li <colyli@...e.de>
To:     Colin Ian King <colin.i.king@...il.com>
Cc:     Kent Overstreet <kent.overstreet@...il.com>,
        Bcache Linux <linux-bcache@...r.kernel.org>,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] bcache: remove redundant assignment to variable
 cur_idx



> 2023年7月25日 19:46,Colin Ian King <colin.i.king@...il.com> 写道:
> 
> Variable cur_idx is being initialized with a value that is never read,
> it is being re-assigned later in a while-loop. Remove the redundant
> assignment. Cleans up clang scan build warning:
> 
> drivers/md/bcache/writeback.c:916:2: warning: Value stored to 'cur_idx'
> is never read [deadcode.DeadStores]
> 
> Signed-off-by: Colin Ian King <colin.i.king@...il.com>

Looks good to me. Thanks.

Reviewed-by: Coly Li <colyli@...e.de>


Coly Li

> ---
> drivers/md/bcache/writeback.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c
> index 24c049067f61..c3e872e0a6f2 100644
> --- a/drivers/md/bcache/writeback.c
> +++ b/drivers/md/bcache/writeback.c
> @@ -913,7 +913,7 @@ static int bch_dirty_init_thread(void *arg)
> int cur_idx, prev_idx, skip_nr;
> 
> k = p = NULL;
> - cur_idx = prev_idx = 0;
> + prev_idx = 0;
> 
> bch_btree_iter_init(&c->root->keys, &iter, NULL);
> k = bch_btree_iter_next_filter(&iter, &c->root->keys, bch_ptr_bad);
> -- 
> 2.39.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ