All of lore.kernel.org
 help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>
Cc: YueHaibing <yuehaibing@huawei.com>, <linux-btrfs@vger.kernel.org>,
	<kernel-janitors@vger.kernel.org>
Subject: [PATCH -next] btrfs: remove set but not used variable 'fs_devices'
Date: Wed, 27 Mar 2019 03:20:24 +0000	[thread overview]
Message-ID: <20190327032024.63906-1-yuehaibing@huawei.com> (raw)

Fixes gcc '-Wunused-but-set-variable' warning:

fs/btrfs/volumes.c: In function 'btrfs_grow_device':
fs/btrfs/volumes.c:2824:27: warning:
 variable 'fs_devices' set but not used [-Wunused-but-set-variable]

It's not used after 6f32a50a232b ("btrfs: combine device update operations
during transaction commit")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 fs/btrfs/volumes.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index afafc92e70e9..605230482009 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2821,7 +2821,6 @@ int btrfs_grow_device(struct btrfs_trans_handle *trans,
 {
 	struct btrfs_fs_info *fs_info = device->fs_info;
 	struct btrfs_super_block *super_copy = fs_info->super_copy;
-	struct btrfs_fs_devices *fs_devices;
 	u64 old_total;
 	u64 diff;
 
@@ -2840,8 +2839,6 @@ int btrfs_grow_device(struct btrfs_trans_handle *trans,
 		return -EINVAL;
 	}
 
-	fs_devices = fs_info->fs_devices;
-
 	btrfs_set_super_total_bytes(super_copy,
 			round_down(old_total + diff, fs_info->sectorsize));
 	device->fs_devices->total_rw_bytes += diff;




WARNING: multiple messages have this Message-ID (diff)
From: YueHaibing <yuehaibing@huawei.com>
To: Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>
Cc: YueHaibing <yuehaibing@huawei.com>,
	linux-btrfs@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH -next] btrfs: remove set but not used variable 'fs_devices'
Date: Wed, 27 Mar 2019 03:20:24 +0000	[thread overview]
Message-ID: <20190327032024.63906-1-yuehaibing@huawei.com> (raw)
In-Reply-To: <1541643283-109411-1-git-send-email-yuehaibing@huawei.com>

Fixes gcc '-Wunused-but-set-variable' warning:

fs/btrfs/volumes.c: In function 'btrfs_grow_device':
fs/btrfs/volumes.c:2824:27: warning:
 variable 'fs_devices' set but not used [-Wunused-but-set-variable]

It's not used after 6f32a50a232b ("btrfs: combine device update operations
during transaction commit")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 fs/btrfs/volumes.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index afafc92e70e9..605230482009 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2821,7 +2821,6 @@ int btrfs_grow_device(struct btrfs_trans_handle *trans,
 {
 	struct btrfs_fs_info *fs_info = device->fs_info;
 	struct btrfs_super_block *super_copy = fs_info->super_copy;
-	struct btrfs_fs_devices *fs_devices;
 	u64 old_total;
 	u64 diff;
 
@@ -2840,8 +2839,6 @@ int btrfs_grow_device(struct btrfs_trans_handle *trans,
 		return -EINVAL;
 	}
 
-	fs_devices = fs_info->fs_devices;
-
 	btrfs_set_super_total_bytes(super_copy,
 			round_down(old_total + diff, fs_info->sectorsize));
 	device->fs_devices->total_rw_bytes += diff;

             reply	other threads:[~2019-03-27  3:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-27  3:20 YueHaibing [this message]
2019-03-27  3:20 ` [PATCH -next] btrfs: remove set but not used variable 'fs_devices' YueHaibing
2019-03-28 14:27 ` David Sterba
2019-03-28 14:27   ` David Sterba
  -- strict thread matches above, loose matches on Subject: below --
2019-04-18  6:43 [PATCH -next] btrfs: Remove set but not used variable 'fs_info' YueHaibing
2019-04-18  6:43 ` YueHaibing
2019-04-18  6:37 ` Nikolay Borisov
2019-04-18  6:37   ` Nikolay Borisov
2019-04-18  7:34   ` YueHaibing
2019-04-18  7:34     ` YueHaibing
2019-04-18 13:43 ` David Sterba
2019-04-18 13:43   ` David Sterba
2018-12-15  6:31 [PATCH -next] btrfs: remove set but not used variable 'num_pages' YueHaibing
2018-12-15  6:31 ` YueHaibing
2018-12-17  3:02 ` Anand Jain
2019-01-04 15:51 ` David Sterba
2019-01-04 15:51   ` David Sterba
2018-11-08  2:14 [PATCH -next] btrfs: remove set but not used variable 'tree' YueHaibing
2018-11-08  2:14 ` YueHaibing
2018-11-08  6:53 ` Nikolay Borisov
2018-11-08  6:53   ` Nikolay Borisov
2018-11-08 12:11 ` David Sterba
2018-11-08 12:11   ` 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=20190327032024.63906-1-yuehaibing@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-btrfs@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.