From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DF36C001DF for ; Tue, 25 Jul 2023 12:49:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232238AbjGYMth (ORCPT ); Tue, 25 Jul 2023 08:49:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229524AbjGYMtf (ORCPT ); Tue, 25 Jul 2023 08:49:35 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4997FC4; Tue, 25 Jul 2023 05:49:34 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id CAEDD1F8D6; Tue, 25 Jul 2023 12:49:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1690289372; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zfxaBQKu9pFIm/CSy+E7ZH0ZFKwSyMdTppqUuWuzZK0=; b=ZMW4KhwS4YTYl+FNV2yCV2SSG41p47it3FrxFVbR/XWhq17vatqFq2tKkAhE/HsTr8QAnG CapZET8Je9swPUfnQvwTg865CY5pfsHFaGYsTC5W+8v0DA96Z6457nsq5IlLkV1GgiKFZW qWG+XwT/hlObMz9POHaegXsrQWHmyKs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1690289372; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zfxaBQKu9pFIm/CSy+E7ZH0ZFKwSyMdTppqUuWuzZK0=; b=jmc0w2TxfUsZ/vakyCbU30JoTCHxiH82j4PTfH38/9kRlQoZOgsX8U/VmK5C/w+VJFHuDP O8wUkSf6Tjc8TLCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B1E0813342; Tue, 25 Jul 2023 12:49:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id G63YINvEv2TbSwAAMHmgww (envelope-from ); Tue, 25 Jul 2023 12:49:31 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: [PATCH][next] bcache: remove redundant assignment to variable cur_idx From: Coly Li In-Reply-To: <20230725114637.37073-1-colin.i.king@gmail.com> Date: Tue, 25 Jul 2023 20:49:19 +0800 Cc: Kent Overstreet , Bcache Linux , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20230725114637.37073-1-colin.i.king@gmail.com> To: Colin Ian King X-Mailer: Apple Mail (2.3731.600.7) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 2023=E5=B9=B47=E6=9C=8825=E6=97=A5 19:46=EF=BC=8CColin Ian King = =E5=86=99=E9=81=93=EF=BC=9A >=20 > 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: >=20 > drivers/md/bcache/writeback.c:916:2: warning: Value stored to = 'cur_idx' > is never read [deadcode.DeadStores] >=20 > Signed-off-by: Colin Ian King Looks good to me. Thanks. Reviewed-by: Coly Li Coly Li > --- > drivers/md/bcache/writeback.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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; >=20 > k =3D p =3D NULL; > - cur_idx =3D prev_idx =3D 0; > + prev_idx =3D 0; >=20 > bch_btree_iter_init(&c->root->keys, &iter, NULL); > k =3D bch_btree_iter_next_filter(&iter, &c->root->keys, bch_ptr_bad); > --=20 > 2.39.2 >=20