diff mbox

[4/4] Btrfs: cleanup unused arguments

Message ID 1350640255-3760-4-git-send-email-bo.li.liu@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Liu Bo Oct. 19, 2012, 9:50 a.m. UTC
'disk_key' is not used at all.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
 fs/btrfs/ctree.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Jan Schmidt Oct. 19, 2012, 12:14 p.m. UTC | #1
Hi liubo,

Patches 3 and 4 are looking good. I'm still trying to sort out on the other two,
as I cannot reproduce your bug with your script, unfortunately.

After applying all 4 patches, the result doesn't compile, here:

fs/btrfs/ctree.c: In function 'balance_level':
fs/btrfs/ctree.c:1799: warning: passing argument 3 of
'tree_mod_log_set_node_key' makes integer from pointer without a cast
fs/btrfs/ctree.c:774: note: expected 'int' but argument is of type 'struct
btrfs_disk_key *'
fs/btrfs/ctree.c:1799: error: too many arguments to function
'tree_mod_log_set_node_key'
fs/btrfs/ctree.c:1844: warning: passing argument 3 of
'tree_mod_log_set_node_key' makes integer from pointer without a cast
fs/btrfs/ctree.c:774: note: expected 'int' but argument is of type 'struct
btrfs_disk_key *'
fs/btrfs/ctree.c:1844: error: too many arguments to function
'tree_mod_log_set_node_key'
fs/btrfs/ctree.c: In function 'push_nodes_for_insert':
fs/btrfs/ctree.c:1943: warning: passing argument 3 of
'tree_mod_log_set_node_key' makes integer from pointer without a cast
fs/btrfs/ctree.c:774: note: expected 'int' but argument is of type 'struct
btrfs_disk_key *'
fs/btrfs/ctree.c:1943: error: too many arguments to function
'tree_mod_log_set_node_key'
fs/btrfs/ctree.c:1996: warning: passing argument 3 of
'tree_mod_log_set_node_key' makes integer from pointer without a cast
fs/btrfs/ctree.c:774: note: expected 'int' but argument is of type 'struct
btrfs_disk_key *'
fs/btrfs/ctree.c:1996: error: too many arguments to function
'tree_mod_log_set_node_key'
fs/btrfs/ctree.c: In function 'fixup_low_keys':
fs/btrfs/ctree.c:2880: warning: passing argument 3 of
'tree_mod_log_set_node_key' makes integer from pointer without a cast
fs/btrfs/ctree.c:774: note: expected 'int' but argument is of type 'struct
btrfs_disk_key *'
fs/btrfs/ctree.c:2880: error: too many arguments to function
'tree_mod_log_set_node_key'
  CC [M]  fs/btrfs/sysfs.o
make[2]: *** [fs/btrfs/ctree.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [fs/btrfs] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [fs] Error 2

-Jan
--
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
Liu Bo Oct. 19, 2012, 12:44 p.m. UTC | #2
On 10/19/2012 08:14 PM, Jan Schmidt wrote:
> Hi liubo,
> 
> Patches 3 and 4 are looking good. I'm still trying to sort out on the other two,
> as I cannot reproduce your bug with your script, unfortunately.
> 
> After applying all 4 patches, the result doesn't compile, here:
> 
> fs/btrfs/ctree.c: In function 'balance_level':
> fs/btrfs/ctree.c:1799: warning: passing argument 3 of
> 'tree_mod_log_set_node_key' makes integer from pointer without a cast
> fs/btrfs/ctree.c:774: note: expected 'int' but argument is of type 'struct
> btrfs_disk_key *'
> fs/btrfs/ctree.c:1799: error: too many arguments to function
> 'tree_mod_log_set_node_key'
> fs/btrfs/ctree.c:1844: warning: passing argument 3 of
> 'tree_mod_log_set_node_key' makes integer from pointer without a cast
> fs/btrfs/ctree.c:774: note: expected 'int' but argument is of type 'struct
> btrfs_disk_key *'
> fs/btrfs/ctree.c:1844: error: too many arguments to function
> 'tree_mod_log_set_node_key'
> fs/btrfs/ctree.c: In function 'push_nodes_for_insert':
> fs/btrfs/ctree.c:1943: warning: passing argument 3 of
> 'tree_mod_log_set_node_key' makes integer from pointer without a cast
> fs/btrfs/ctree.c:774: note: expected 'int' but argument is of type 'struct
> btrfs_disk_key *'
> fs/btrfs/ctree.c:1943: error: too many arguments to function
> 'tree_mod_log_set_node_key'
> fs/btrfs/ctree.c:1996: warning: passing argument 3 of
> 'tree_mod_log_set_node_key' makes integer from pointer without a cast
> fs/btrfs/ctree.c:774: note: expected 'int' but argument is of type 'struct
> btrfs_disk_key *'
> fs/btrfs/ctree.c:1996: error: too many arguments to function
> 'tree_mod_log_set_node_key'
> fs/btrfs/ctree.c: In function 'fixup_low_keys':
> fs/btrfs/ctree.c:2880: warning: passing argument 3 of
> 'tree_mod_log_set_node_key' makes integer from pointer without a cast
> fs/btrfs/ctree.c:774: note: expected 'int' but argument is of type 'struct
> btrfs_disk_key *'
> fs/btrfs/ctree.c:2880: error: too many arguments to function
> 'tree_mod_log_set_node_key'
>   CC [M]  fs/btrfs/sysfs.o
> make[2]: *** [fs/btrfs/ctree.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [fs/btrfs] Error 2
> make[1]: *** Waiting for unfinished jobs....
> make: *** [fs] Error 2
> 

oh, I'm so sorry, I forgot to format new patches and sent the wrong version.

Sorry for the trouble.

thanks,
liubo

> -Jan
> --
> 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
> 

--
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 235831f..7f649d2 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -772,8 +772,7 @@  tree_mod_log_eb_move(struct btrfs_fs_info *fs_info, struct extent_buffer *dst,
 
 static noinline void
 tree_mod_log_set_node_key(struct btrfs_fs_info *fs_info,
-			  struct extent_buffer *eb,
-			  struct btrfs_disk_key *disk_key, int slot, int atomic)
+			  struct extent_buffer *eb, int slot, int atomic)
 {
 	int ret;