Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2947459ybb; Sun, 5 Apr 2020 21:43:58 -0700 (PDT) X-Google-Smtp-Source: APiQypKCSeN5zhFgBqapqLaFmTCXVTO6x06MG3xMCK14NzGbAKX3Q1xrmfgI2vus8vFr4UGf82ac X-Received: by 2002:aca:34c6:: with SMTP id b189mr11380397oia.63.1586148238213; Sun, 05 Apr 2020 21:43:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586148238; cv=none; d=google.com; s=arc-20160816; b=hyypV1u7LX9MQgWs/F0o2ftIZJVV0aqplgAeXcP/gKJA6peUGDR4/7uiKZ/gCn1IyL 36U71hy9HpjpWNohsG1AAsgeGblk3sE5OBbMz51soYvYK++v9PTiP9uk63Oh3yfbg/MS 8aHwhnVP8U1WXs0zWpyQDnRO0tcYi8/DFcUS8Pgkz9DmWnBNAwbCbaUHVROYBqf680X5 nsg4R0fW1u2CbOxul0wPio+GAoVXfAm4foChYeXOZ56IiAgN9S03ZB6olt55sJYUyM2A 362jwQ6OoL58+T7OWE/fU4Jpb3Y9s3ic8sK9HGl/QHGnIVMMgorZe08ozV93aU9orTp9 CMaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=IaopsJs4RFMdNujW76gMt4W9f/daGQ27CvEBHMSa6fg=; b=MInppsBRIBfoWndYCwxBhCQdtXuboM1y4SYN7nmE0ct2hTfVcPMsrI4yYLa10ovYNr +P4n8fyl5GKeYoKAAYeV93FR31tQLCtnZqRykYafUDUwWY4zDD73vReOQt70O/KKBy2W FgXuj2RNC7C2a1lYOC0h7LYhrW5zxsA34aLGcsIroSpP7T882CRYmlv1aj4TmVOs32I+ 6XWPRMgDYMcLwNsM9NhCGEe/GS+gLUFi4cPEmka4wrNplrLhacWAZ1OvQyE6FtP3ft1Q Or/oQ9AXtQhJXK89V6Dy8CLXvJJ1oVcZLPKLevzKsOxeTBo5sDvctBlz9VwJfGefADNw 1X2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x33si7195677otb.48.2020.04.05.21.43.44; Sun, 05 Apr 2020 21:43:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726473AbgDFEnQ (ORCPT + 99 others); Mon, 6 Apr 2020 00:43:16 -0400 Received: from mx2.suse.de ([195.135.220.15]:43684 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725768AbgDFEnQ (ORCPT ); Mon, 6 Apr 2020 00:43:16 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id ECBFBACC3; Mon, 6 Apr 2020 04:43:13 +0000 (UTC) Subject: Re: [PATCH] bcache: remove set but not used variable 'i' To: Wang Hai , kent.overstreet@gmail.com Cc: linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org References: <1586259407-23673-1-git-send-email-wanghai38@huawei.com> From: Coly Li Organization: SUSE Labs Message-ID: Date: Mon, 6 Apr 2020 12:43:08 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <1586259407-23673-1-git-send-email-wanghai38@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: Wang Hai 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; > >