Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3725710pxb; Tue, 17 Nov 2020 01:40:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxb7prsAaCxTIG9Dwog8OWFungmcDkB6Q/4n7QYeIFvc/eki8z5cETCXUjAzCwkswb4l4PF X-Received: by 2002:a17:906:f753:: with SMTP id jp19mr18048427ejb.280.1605606012087; Tue, 17 Nov 2020 01:40:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605606012; cv=none; d=google.com; s=arc-20160816; b=QclHsOzL4dSoti7pnK6pcMnjWHhfSdfxF6yZU0KzLGqZsZMlzeJkOR7FzPnultovRw yEOtV9MFB+07HBtyBIIaf3h16Ji+yaP7rBCQiMl2sNBseO0/upAUcyJJU32Tg5Qhsjm5 igF7c5D90TF4uz3b73qw2aBXNlLAR0ZELXYuFnEsXSEjXxggo5hLtt7BvBNqQdmmNQxZ luYEYoavr53kyTB+3tquipXDt9Re+LYuMfWhjDD8iwZ+J1WaLRdmB2cWVMy6S6Ze0DVw XQLFxE7ovch5SmudjxH9JMnjYuiUx4wJtcILTzs1ywtAvF//Modi0MfO4T31a+BtG5z0 zqdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=DmCvJ0Zzx3pVdIjleh7s2ZJ+T2LzpIXZlDg/YPJ4Yvc=; b=Qhv25UEjoeSx+O2CUmym/h2S/X/IN3OXGb9HfAQ/rbiEMftCFVUFoy8t6/85TsSiwF aMgAdKWuO5JcFo/WBe5SElr6VRSzMyB560LWNkqq6UiaHbQROGSXbTAzOzngQP63u75F 7nP8ewj0UWQwFEOiXHS6kgiMIMhlOTduASg+ZsEsqBvnitit4TpY54V6N+YarrNUN8Eu q+tMH76d5G9akBmgAqkfhGDM1vQ2xqkkTe8m+N0GSRuBfuYfTNlf5NRXZBZNKsAJk4PL equJaDcKw16UtdSUDP6rEpFO6gqaffGbTKueSl+bjeW1JXP4uATnqHmb7MFVhvpCtWHj JM9w== 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 q3si742321edr.472.2020.11.17.01.39.48; Tue, 17 Nov 2020 01:40:12 -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 S1726348AbgKQJgJ (ORCPT + 99 others); Tue, 17 Nov 2020 04:36:09 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:7553 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725747AbgKQJgI (ORCPT ); Tue, 17 Nov 2020 04:36:08 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Cb15j2QDvzhYBs; Tue, 17 Nov 2020 17:35:53 +0800 (CST) Received: from linux-lmwb.huawei.com (10.175.103.112) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Tue, 17 Nov 2020 17:36:00 +0800 From: Zou Wei To: , , CC: , , Zou Wei Subject: [PATCH -next] btrfs: remove unused variable Date: Tue, 17 Nov 2020 17:47:43 +0800 Message-ID: <1605606463-78936-1-git-send-email-zou_wei@huawei.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.175.103.112] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); - 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; zone_sectors_shift = ilog2(zone_sectors); nr_zones = nr_sectors >> zone_sectors_shift; -- 2.6.2