diff mbox

[1/2] btrfs: Fix warning "variable ‘gen’ set but not used"

Message ID 20160823222323.9613-1-luis.henriques@canonical.com (mailing list archive)
State New, archived
Headers show

Commit Message

Luis Henriques Aug. 23, 2016, 10:23 p.m. UTC
Variable 'gen' in reada_for_search() is not used since commit 58dc4ce43251
("btrfs: remove unused parameter from readahead_tree_block").  This patch
simply removes this variable.

Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 fs/btrfs/ctree.c | 2 --
 1 file changed, 2 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Sterba Aug. 24, 2016, 11:55 a.m. UTC | #1
On Tue, Aug 23, 2016 at 11:23:23PM +0100, Luis Henriques wrote:
> Variable 'gen' in reada_for_search() is not used since commit 58dc4ce43251
> ("btrfs: remove unused parameter from readahead_tree_block").  This patch
> simply removes this variable.
> 
> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>

Reviewed-by: David Sterba <dsterba@suse.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index d1c56c94dd5a..dcd39cca7e43 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -2268,7 +2268,6 @@  static void reada_for_search(struct btrfs_root *root,
 	u64 search;
 	u64 target;
 	u64 nread = 0;
-	u64 gen;
 	struct extent_buffer *eb;
 	u32 nr;
 	u32 blocksize;
@@ -2313,7 +2312,6 @@  static void reada_for_search(struct btrfs_root *root,
 		search = btrfs_node_blockptr(node, nr);
 		if ((search <= target && target - search <= 65536) ||
 		    (search > target && search - target <= 65536)) {
-			gen = btrfs_node_ptr_generation(node, nr);
 			readahead_tree_block(root, search);
 			nread += blocksize;
 		}