Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2443991pxu; Sat, 28 Nov 2020 14:22:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnwnZ8+wfzK8yFkl3wMWu3VsIOd1wGB8cMxGyPBzxCnSpgZ5Dgs36LqYqt+zgq15udfjT3 X-Received: by 2002:a05:6402:b4c:: with SMTP id bx12mr14570123edb.196.1606602144537; Sat, 28 Nov 2020 14:22:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606602144; cv=none; d=google.com; s=arc-20160816; b=IFQINDs6rSZtcZJlvI1NP5ZeOy8bxvldZ9RzV97IbGg6f3Wsd957XEvgQQaluG3Ie0 Mg1bE8agUeo++Q3FCe9/LcV5vuDubwUqeH/OzXVEwKKQDdARPdlRA0D4YVC3KCCV6rQZ +SE4924u3yXj1WlpycKfU8cyWTG02LJ47yCq2QTe2RM8/1tLR4FEEfjPjPOsSUv21UEY Nc2+EMUKg4uy7rIipM9p92Rg4DClh7I6FLgi3eCaKfXzUV26MOxHdu2lmyTsF4cvEv+r 1+8/UDCfOlj+Lg0d3mbpG7nx5YYKuW2ky7NXjkb/GSuBYfvvEWoz7bzOf8/cRl659eWA rjHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date; bh=OPB9W1TRbqL+gGA9H5GV45mEwbPreOKlwP+2w0YuoFU=; b=VpmocQ0iLRP0EDi458y83cQz6t/qq0Tp23SjYiVditUFiqKH2SwdTZWol4+mhRi8Yv Yect5g2VK4YlNlUGbehFtQk3rKKz5frvkwIuKhcsp2hK03bSDfCw6BjIjN+nzdrh4hgO PRqN5Lut1ALBgD4XJtH3arYaCb9a2SiYezTg4uMvmTS2LuO3QIVxG/1TiogAp4vLByk1 jwN/ApdcbYKGWomBV1EVHS3E6aF6BdrHyEy9f+BhGhz0cZzrnyoqK8X9s6QwllkC3I+9 yTovMQUXDj7//zXB3iWJejng6o0hL2KErrwyhNJpvOmM7vF+CVfqID2GdaRYGMx8WYze 7fNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i8si8491889ejj.700.2020.11.28.14.22.02; Sat, 28 Nov 2020 14:22:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388364AbgK1Vtg (ORCPT + 99 others); Sat, 28 Nov 2020 16:49:36 -0500 Received: from mx2.suse.de ([195.135.220.15]:55360 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730513AbgK0TwB (ORCPT ); Fri, 27 Nov 2020 14:52:01 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 37E66AD1E; Fri, 27 Nov 2020 19:51:25 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 25CACDA7D9; Fri, 27 Nov 2020 20:49:55 +0100 (CET) Date: Fri, 27 Nov 2020 20:49:55 +0100 From: David Sterba To: Zou Wei Cc: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] btrfs: remove unused variable Message-ID: <20201127194954.GF6430@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Zou Wei , clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org References: <1605606463-78936-1-git-send-email-zou_wei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1605606463-78936-1-git-send-email-zou_wei@huawei.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 17, 2020 at 05:47:43PM +0800, Zou Wei wrote: > Fix variable set but not used compilation warnings: > > fs/btrfs/ctree.c:1581:6: warning: variable ‘parent_level’ set but not used [-Wunused-but-set-variable] > int parent_level; > ^~~~~~~~~~~~ > > fs/btrfs/zoned.c:503:6: warning: variable ‘zone_size’ set but not used [-Wunused-but-set-variable] > u64 zone_size; > ^~~~~~~~~ > > Signed-off-by: Zou Wei > --- > fs/btrfs/ctree.c | 3 --- > fs/btrfs/zoned.c | 2 -- > 2 files changed, 5 deletions(-) > > diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c > index 32a57a7..e5a0941 100644 > --- a/fs/btrfs/ctree.c > +++ b/fs/btrfs/ctree.c > @@ -1578,13 +1578,10 @@ int btrfs_realloc_node(struct btrfs_trans_handle *trans, > int end_slot; > int i; > int err = 0; > - int parent_level; > u32 blocksize; > int progress_passed = 0; > struct btrfs_disk_key disk_key; > > - parent_level = btrfs_header_level(parent); That one folded to the patch, thanks. > - > WARN_ON(trans->transaction != fs_info->running_transaction); > WARN_ON(trans->transid != fs_info->generation); > > diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c > index fa9cc61..742f088 100644 > --- a/fs/btrfs/zoned.c > +++ b/fs/btrfs/zoned.c > @@ -500,7 +500,6 @@ int btrfs_sb_log_location_bdev(struct block_device *bdev, int mirror, int rw, > unsigned int zone_sectors; > u32 sb_zone; > int ret; > - u64 zone_size; > u8 zone_sectors_shift; > sector_t nr_sectors = bdev->bd_part->nr_sects; > u32 nr_zones; > @@ -515,7 +514,6 @@ int btrfs_sb_log_location_bdev(struct block_device *bdev, int mirror, int rw, > zone_sectors = bdev_zone_sectors(bdev); > if (!is_power_of_2(zone_sectors)) > return -EINVAL; > - zone_size = zone_sectors << SECTOR_SHIFT; That was intended to be used a few lines below, so that's not for removal. > zone_sectors_shift = ilog2(zone_sectors); > nr_zones = nr_sectors >> zone_sectors_shift; > > -- > 2.6.2