All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] btrfs: remove set but not used variable 'fs_devices'
  2018-11-08  2:14 ` YueHaibing
@ 2019-03-27  3:20 ` YueHaibing
  -1 siblings, 0 replies; 23+ messages in thread
From: YueHaibing @ 2019-03-27  3:20 UTC (permalink / raw)
  To: Chris Mason, Josef Bacik, David Sterba
  Cc: YueHaibing, linux-btrfs, kernel-janitors

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;




^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [PATCH -next] btrfs: Remove set but not used variable 'fs_info'
  2018-11-08  2:14 ` YueHaibing
@ 2019-04-18  6:43 ` YueHaibing
  -1 siblings, 0 replies; 23+ messages in thread
From: YueHaibing @ 2019-04-18  6:43 UTC (permalink / raw)
  To: Chris Mason, Josef Bacik, David Sterba
  Cc: YueHaibing, linux-btrfs, kernel-janitors

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

fs/btrfs/free-space-tree.c: In function 'load_free_space_tree':
fs/btrfs/free-space-tree.c:1535:24: warning:
 variable 'fs_info' set but not used [-Wunused-but-set-variable]

It's not used since commit 05e9d3137d47 ("btrfs: get fs_info from block group
in search_free_space_info"),  so can be removed.

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

diff --git a/fs/btrfs/free-space-tree.c b/fs/btrfs/free-space-tree.c
index cfe9dfb0ff05..f5dc115ebba0 100644
--- a/fs/btrfs/free-space-tree.c
+++ b/fs/btrfs/free-space-tree.c
@@ -1532,14 +1532,12 @@ static int load_free_space_extents(struct btrfs_caching_control *caching_ctl,
 int load_free_space_tree(struct btrfs_caching_control *caching_ctl)
 {
 	struct btrfs_block_group_cache *block_group;
-	struct btrfs_fs_info *fs_info;
 	struct btrfs_free_space_info *info;
 	struct btrfs_path *path;
 	u32 extent_count, flags;
 	int ret;
 
 	block_group = caching_ctl->block_group;
-	fs_info = block_group->fs_info;
 
 	path = btrfs_alloc_path();
 	if (!path)




^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [PATCH -next] btrfs: remove set but not used variable 'num_pages'
  2018-11-08  2:14 ` YueHaibing
@ 2018-12-15  6:31 ` YueHaibing
  -1 siblings, 0 replies; 23+ messages in thread
From: YueHaibing @ 2018-12-15  6:31 UTC (permalink / raw)
  To: Chris Mason, Josef Bacik, David Sterba
  Cc: YueHaibing, linux-btrfs, kernel-janitors

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

fs/btrfs/ioctl.c: In function 'btrfs_extent_same':
fs/btrfs/ioctl.c:3260:6: warning:
 variable 'num_pages' set but not used [-Wunused-but-set-variable]

It not used any more since commit 9ee8234e6220 ("Btrfs: use
generic_remap_file_range_prep() for cloning and deduplication")

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

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index fab9443..15fc467 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -3257,7 +3257,6 @@ static int btrfs_extent_same(struct inode *src, u64 loff, u64 olen,
 			     struct inode *dst, u64 dst_loff)
 {
 	int ret;
-	int num_pages = PAGE_ALIGN(BTRFS_MAX_DEDUPE_LEN) >> PAGE_SHIFT;
 	u64 i, tail_len, chunk_count;
 
 	/* don't make the dst file partly checksummed */
@@ -3270,8 +3269,6 @@ static int btrfs_extent_same(struct inode *src, u64 loff, u64 olen,
 
 	tail_len = olen % BTRFS_MAX_DEDUPE_LEN;
 	chunk_count = div_u64(olen, BTRFS_MAX_DEDUPE_LEN);
-	if (chunk_count == 0)
-		num_pages = PAGE_ALIGN(tail_len) >> PAGE_SHIFT;
 
 	for (i = 0; i < chunk_count; i++) {
 		ret = btrfs_extent_same_range(src, loff, BTRFS_MAX_DEDUPE_LEN,




^ permalink raw reply related	[flat|nested] 23+ messages in thread
* [PATCH -next] btrfs: remove set but not used variable 'tree'
@ 2018-11-08  2:14 ` YueHaibing
  0 siblings, 0 replies; 23+ messages in thread
From: YueHaibing @ 2018-11-08  2:14 UTC (permalink / raw)
  To: Chris Mason, Josef Bacik, David Sterba
  Cc: YueHaibing, linux-btrfs, kernel-janitors

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

fs/btrfs/extent_io.c: In function 'end_extent_writepage':
fs/btrfs/extent_io.c:2406:25: warning:
 variable 'tree' set but not used [-Wunused-but-set-variable]

It not used any more after
commit 2922040236f9 ("btrfs: Remove extent_io_ops::writepage_end_io_hook")

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

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 0f8f9c0..17a15cc 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2403,11 +2403,8 @@ static int bio_readpage_error(struct bio *failed_bio, u64 phy_offset,
 void end_extent_writepage(struct page *page, int err, u64 start, u64 end)
 {
 	int uptodate = (err == 0);
-	struct extent_io_tree *tree;
 	int ret = 0;
 
-	tree = &BTRFS_I(page->mapping->host)->io_tree;
-
 	btrfs_writepage_endio_finish_ordered(page, start, end, NULL, uptodate);
 
 	if (!uptodate) {




^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2019-04-18 13:43 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-27  3:20 [PATCH -next] btrfs: remove set but not used variable 'fs_devices' YueHaibing
2019-03-27  3:20 ` 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

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.