linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hfs/hfsplus: Clean up unused variables in bnode.c
@ 2017-10-14 10:32 Christos Gkekas
  2017-10-18  4:10 ` Ernesto A. Fernández
  0 siblings, 1 reply; 2+ messages in thread
From: Christos Gkekas @ 2017-10-14 10:32 UTC (permalink / raw)
  To: linux-fsdevel, linux-kernel; +Cc: Christos Gkekas

Delete variables 'tree' and 'sb', which are set but never used.

Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
---
 fs/hfs/bnode.c     | 4 ----
 fs/hfsplus/bnode.c | 4 ----
 2 files changed, 8 deletions(-)

diff --git a/fs/hfs/bnode.c b/fs/hfs/bnode.c
index d77d844..8d618c9 100644
--- a/fs/hfs/bnode.c
+++ b/fs/hfs/bnode.c
@@ -97,13 +97,11 @@ void hfs_bnode_clear(struct hfs_bnode *node, int off, int len)
 void hfs_bnode_copy(struct hfs_bnode *dst_node, int dst,
 		struct hfs_bnode *src_node, int src, int len)
 {
-	struct hfs_btree *tree;
 	struct page *src_page, *dst_page;
 
 	hfs_dbg(BNODE_MOD, "copybytes: %u,%u,%u\n", dst, src, len);
 	if (!len)
 		return;
-	tree = src_node->tree;
 	src += src_node->page_offset;
 	dst += dst_node->page_offset;
 	src_page = src_node->page[0];
@@ -236,7 +234,6 @@ struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *tree, u32 cnid)
 
 static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
 {
-	struct super_block *sb;
 	struct hfs_bnode *node, *node2;
 	struct address_space *mapping;
 	struct page *page;
@@ -248,7 +245,6 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
 		return NULL;
 	}
 
-	sb = tree->inode->i_sb;
 	size = sizeof(struct hfs_bnode) + tree->pages_per_bnode *
 		sizeof(struct page *);
 	node = kzalloc(size, GFP_KERNEL);
diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c
index ce014ce..9cd8b42 100644
--- a/fs/hfsplus/bnode.c
+++ b/fs/hfsplus/bnode.c
@@ -126,14 +126,12 @@ void hfs_bnode_clear(struct hfs_bnode *node, int off, int len)
 void hfs_bnode_copy(struct hfs_bnode *dst_node, int dst,
 		    struct hfs_bnode *src_node, int src, int len)
 {
-	struct hfs_btree *tree;
 	struct page **src_page, **dst_page;
 	int l;
 
 	hfs_dbg(BNODE_MOD, "copybytes: %u,%u,%u\n", dst, src, len);
 	if (!len)
 		return;
-	tree = src_node->tree;
 	src += src_node->page_offset;
 	dst += dst_node->page_offset;
 	src_page = src_node->page + (src >> PAGE_SHIFT);
@@ -400,7 +398,6 @@ struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *tree, u32 cnid)
 
 static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
 {
-	struct super_block *sb;
 	struct hfs_bnode *node, *node2;
 	struct address_space *mapping;
 	struct page *page;
@@ -413,7 +410,6 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
 		return NULL;
 	}
 
-	sb = tree->inode->i_sb;
 	size = sizeof(struct hfs_bnode) + tree->pages_per_bnode *
 		sizeof(struct page *);
 	node = kzalloc(size, GFP_KERNEL);
-- 
2.7.4

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

* Re: [PATCH] hfs/hfsplus: Clean up unused variables in bnode.c
  2017-10-14 10:32 [PATCH] hfs/hfsplus: Clean up unused variables in bnode.c Christos Gkekas
@ 2017-10-18  4:10 ` Ernesto A. Fernández
  0 siblings, 0 replies; 2+ messages in thread
From: Ernesto A. Fernández @ 2017-10-18  4:10 UTC (permalink / raw)
  To: Christos Gkekas; +Cc: linux-fsdevel, linux-kernel, Ernesto A. Fernández

On Sat, Oct 14, 2017 at 11:32:26AM +0100, Christos Gkekas wrote:
> Delete variables 'tree' and 'sb', which are set but never used.
> 
> Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>

Looks good. If it helps you can add:

Reviewed-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>

> ---
>  fs/hfs/bnode.c     | 4 ----
>  fs/hfsplus/bnode.c | 4 ----
>  2 files changed, 8 deletions(-)
> 
> diff --git a/fs/hfs/bnode.c b/fs/hfs/bnode.c
> index d77d844..8d618c9 100644
> --- a/fs/hfs/bnode.c
> +++ b/fs/hfs/bnode.c
> @@ -97,13 +97,11 @@ void hfs_bnode_clear(struct hfs_bnode *node, int off, int len)
>  void hfs_bnode_copy(struct hfs_bnode *dst_node, int dst,
>  		struct hfs_bnode *src_node, int src, int len)
>  {
> -	struct hfs_btree *tree;
>  	struct page *src_page, *dst_page;
>  
>  	hfs_dbg(BNODE_MOD, "copybytes: %u,%u,%u\n", dst, src, len);
>  	if (!len)
>  		return;
> -	tree = src_node->tree;
>  	src += src_node->page_offset;
>  	dst += dst_node->page_offset;
>  	src_page = src_node->page[0];
> @@ -236,7 +234,6 @@ struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *tree, u32 cnid)
>  
>  static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
>  {
> -	struct super_block *sb;
>  	struct hfs_bnode *node, *node2;
>  	struct address_space *mapping;
>  	struct page *page;
> @@ -248,7 +245,6 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
>  		return NULL;
>  	}
>  
> -	sb = tree->inode->i_sb;
>  	size = sizeof(struct hfs_bnode) + tree->pages_per_bnode *
>  		sizeof(struct page *);
>  	node = kzalloc(size, GFP_KERNEL);
> diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c
> index ce014ce..9cd8b42 100644
> --- a/fs/hfsplus/bnode.c
> +++ b/fs/hfsplus/bnode.c
> @@ -126,14 +126,12 @@ void hfs_bnode_clear(struct hfs_bnode *node, int off, int len)
>  void hfs_bnode_copy(struct hfs_bnode *dst_node, int dst,
>  		    struct hfs_bnode *src_node, int src, int len)
>  {
> -	struct hfs_btree *tree;
>  	struct page **src_page, **dst_page;
>  	int l;
>  
>  	hfs_dbg(BNODE_MOD, "copybytes: %u,%u,%u\n", dst, src, len);
>  	if (!len)
>  		return;
> -	tree = src_node->tree;
>  	src += src_node->page_offset;
>  	dst += dst_node->page_offset;
>  	src_page = src_node->page + (src >> PAGE_SHIFT);
> @@ -400,7 +398,6 @@ struct hfs_bnode *hfs_bnode_findhash(struct hfs_btree *tree, u32 cnid)
>  
>  static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
>  {
> -	struct super_block *sb;
>  	struct hfs_bnode *node, *node2;
>  	struct address_space *mapping;
>  	struct page *page;
> @@ -413,7 +410,6 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
>  		return NULL;
>  	}
>  
> -	sb = tree->inode->i_sb;
>  	size = sizeof(struct hfs_bnode) + tree->pages_per_bnode *
>  		sizeof(struct page *);
>  	node = kzalloc(size, GFP_KERNEL);
> -- 
> 2.7.4
> 

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

end of thread, other threads:[~2017-10-18  4:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-14 10:32 [PATCH] hfs/hfsplus: Clean up unused variables in bnode.c Christos Gkekas
2017-10-18  4:10 ` Ernesto A. Fernández

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).