All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zou Wei <zou_wei@huawei.com>
To: <clm@fb.com>, <josef@toxicpanda.com>, <dsterba@suse.com>
Cc: <linux-btrfs@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Zou Wei <zou_wei@huawei.com>
Subject: [PATCH -next] btrfs: remove unused variable
Date: Tue, 17 Nov 2020 17:47:43 +0800	[thread overview]
Message-ID: <1605606463-78936-1-git-send-email-zou_wei@huawei.com> (raw)

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 <zou_wei@huawei.com>
---
 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


             reply	other threads:[~2020-11-17  9:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17  9:47 Zou Wei [this message]
2020-11-27 19:49 ` [PATCH -next] btrfs: remove unused variable David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1605606463-78936-1-git-send-email-zou_wei@huawei.com \
    --to=zou_wei@huawei.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.