aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorStefan Behrens <sbehrens@giantdisaster.de>2013-08-14 12:12:25 -0400
committerChris Mason <chris.mason@fusionio.com>2013-09-01 08:15:50 -0400
commit35a3621beb3e2face3e7954eaee20a8fa0043fac (patch)
tree2af11fe9a4421f1438de09e687749c25b8d6b37a /fs/btrfs
parent18674c6cc10e78745f7af7faf26583ea9fe78c38 (diff)
Btrfs: get rid of sparse warnings
make C=2 fs/btrfs/ CF=-D__CHECK_ENDIAN__ I tried to filter out the warnings for which patches have already been sent to the mailing list, pending for inclusion in btrfs-next. All these changes should be obviously safe. Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/backref.c2
-rw-r--r--fs/btrfs/check-integrity.c2
-rw-r--r--fs/btrfs/ctree.c6
-rw-r--r--fs/btrfs/ctree.h3
-rw-r--r--fs/btrfs/delayed-ref.c2
-rw-r--r--fs/btrfs/disk-io.c8
-rw-r--r--fs/btrfs/extent_io.c4
-rw-r--r--fs/btrfs/send.c4
-rw-r--r--fs/btrfs/volumes.c3
9 files changed, 17 insertions, 17 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index ae798c1d088b..977e9c66f2e3 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -365,7 +365,7 @@ static int __resolve_indirect_refs(struct btrfs_fs_info *fs_info,
365 node = ulist_next(parents, &uiter); 365 node = ulist_next(parents, &uiter);
366 ref->parent = node ? node->val : 0; 366 ref->parent = node ? node->val : 0;
367 ref->inode_list = node ? 367 ref->inode_list = node ?
368 (struct extent_inode_elem *)(uintptr_t)node->aux : 0; 368 (struct extent_inode_elem *)(uintptr_t)node->aux : NULL;
369 369
370 /* additional parents require new refs being added here */ 370 /* additional parents require new refs being added here */
371 while ((node = ulist_next(parents, &uiter))) { 371 while ((node = ulist_next(parents, &uiter))) {
diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
index 1f706e93e622..07f39a3dedb0 100644
--- a/fs/btrfs/check-integrity.c
+++ b/fs/btrfs/check-integrity.c
@@ -2441,7 +2441,7 @@ static int btrfsic_process_written_superblock(
2441 int num_copies; 2441 int num_copies;
2442 int mirror_num; 2442 int mirror_num;
2443 const char *additional_string = NULL; 2443 const char *additional_string = NULL;
2444 struct btrfs_disk_key tmp_disk_key; 2444 struct btrfs_disk_key tmp_disk_key = {0};
2445 2445
2446 btrfs_set_disk_key_objectid(&tmp_disk_key, 2446 btrfs_set_disk_key_objectid(&tmp_disk_key,
2447 BTRFS_ROOT_ITEM_KEY); 2447 BTRFS_ROOT_ITEM_KEY);
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 0708ebed2df7..09b3870c2729 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -1067,7 +1067,7 @@ __tree_mod_log_oldest_root(struct btrfs_fs_info *fs_info,
1067 int looped = 0; 1067 int looped = 0;
1068 1068
1069 if (!time_seq) 1069 if (!time_seq)
1070 return 0; 1070 return NULL;
1071 1071
1072 /* 1072 /*
1073 * the very last operation that's logged for a root is the replacement 1073 * the very last operation that's logged for a root is the replacement
@@ -1078,7 +1078,7 @@ __tree_mod_log_oldest_root(struct btrfs_fs_info *fs_info,
1078 tm = tree_mod_log_search_oldest(fs_info, root_logical, 1078 tm = tree_mod_log_search_oldest(fs_info, root_logical,
1079 time_seq); 1079 time_seq);
1080 if (!looped && !tm) 1080 if (!looped && !tm)
1081 return 0; 1081 return NULL;
1082 /* 1082 /*
1083 * if there are no tree operation for the oldest root, we simply 1083 * if there are no tree operation for the oldest root, we simply
1084 * return it. this should only happen if that (old) root is at 1084 * return it. this should only happen if that (old) root is at
@@ -4782,7 +4782,7 @@ int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root,
4782 * This may release the path, and so you may lose any locks held at the 4782 * This may release the path, and so you may lose any locks held at the
4783 * time you call it. 4783 * time you call it.
4784 */ 4784 */
4785int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path) 4785static int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path)
4786{ 4786{
4787 struct btrfs_key key; 4787 struct btrfs_key key;
4788 struct btrfs_disk_key found_key; 4788 struct btrfs_disk_key found_key;
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 9766e9f04024..56f8c1b1016a 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -3706,6 +3706,9 @@ int btrfs_defrag_file(struct inode *inode, struct file *file,
3706 u64 newer_than, unsigned long max_pages); 3706 u64 newer_than, unsigned long max_pages);
3707void btrfs_get_block_group_info(struct list_head *groups_list, 3707void btrfs_get_block_group_info(struct list_head *groups_list,
3708 struct btrfs_ioctl_space_info *space); 3708 struct btrfs_ioctl_space_info *space);
3709void update_ioctl_balance_args(struct btrfs_fs_info *fs_info, int lock,
3710 struct btrfs_ioctl_balance_args *bargs);
3711
3709 3712
3710/* file.c */ 3713/* file.c */
3711int btrfs_auto_defrag_init(void); 3714int btrfs_auto_defrag_init(void);
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
index f7be9f76a12b..e4d467be2dd4 100644
--- a/fs/btrfs/delayed-ref.c
+++ b/fs/btrfs/delayed-ref.c
@@ -241,7 +241,7 @@ int btrfs_delayed_ref_lock(struct btrfs_trans_handle *trans,
241 return 0; 241 return 0;
242} 242}
243 243
244static void inline drop_delayed_ref(struct btrfs_trans_handle *trans, 244static inline void drop_delayed_ref(struct btrfs_trans_handle *trans,
245 struct btrfs_delayed_ref_root *delayed_refs, 245 struct btrfs_delayed_ref_root *delayed_refs,
246 struct btrfs_delayed_ref_node *ref) 246 struct btrfs_delayed_ref_node *ref)
247{ 247{
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 68391ecf2c59..77a9d46b5cdb 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1433,8 +1433,8 @@ int btrfs_add_log_tree(struct btrfs_trans_handle *trans,
1433 return 0; 1433 return 0;
1434} 1434}
1435 1435
1436struct btrfs_root *btrfs_read_tree_root(struct btrfs_root *tree_root, 1436static struct btrfs_root *btrfs_read_tree_root(struct btrfs_root *tree_root,
1437 struct btrfs_key *key) 1437 struct btrfs_key *key)
1438{ 1438{
1439 struct btrfs_root *root; 1439 struct btrfs_root *root;
1440 struct btrfs_fs_info *fs_info = tree_root->fs_info; 1440 struct btrfs_fs_info *fs_info = tree_root->fs_info;
@@ -3754,8 +3754,8 @@ static void btrfs_destroy_all_ordered_extents(struct btrfs_fs_info *fs_info)
3754 spin_unlock(&fs_info->ordered_root_lock); 3754 spin_unlock(&fs_info->ordered_root_lock);
3755} 3755}
3756 3756
3757int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans, 3757static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans,
3758 struct btrfs_root *root) 3758 struct btrfs_root *root)
3759{ 3759{
3760 struct rb_node *node; 3760 struct rb_node *node;
3761 struct btrfs_delayed_ref_root *delayed_refs; 3761 struct btrfs_delayed_ref_root *delayed_refs;
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index df6e6c27782e..94362ad5dc49 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2954,11 +2954,11 @@ static void __extent_readpages(struct extent_io_tree *tree,
2954 struct bio **bio, int mirror_num, 2954 struct bio **bio, int mirror_num,
2955 unsigned long *bio_flags, int rw) 2955 unsigned long *bio_flags, int rw)
2956{ 2956{
2957 u64 start; 2957 u64 start = 0;
2958 u64 end = 0; 2958 u64 end = 0;
2959 u64 page_start; 2959 u64 page_start;
2960 int index; 2960 int index;
2961 int first_index; 2961 int first_index = 0;
2962 2962
2963 for (index = 0; index < nr_pages; index++) { 2963 for (index = 0; index < nr_pages; index++) {
2964 page_start = page_offset(pages[index]); 2964 page_start = page_offset(pages[index]);
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index fc03a5755a6b..db7da682f0d2 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -54,8 +54,8 @@ struct fs_path {
54 54
55 char *buf; 55 char *buf;
56 int buf_len; 56 int buf_len;
57 int reversed:1; 57 unsigned int reversed:1;
58 int virtual_mem:1; 58 unsigned int virtual_mem:1;
59 char inline_buf[]; 59 char inline_buf[];
60 }; 60 };
61 char pad[PAGE_SIZE]; 61 char pad[PAGE_SIZE];
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 44abd151132a..306547b51a13 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -3076,9 +3076,6 @@ static void __cancel_balance(struct btrfs_fs_info *fs_info)
3076 atomic_set(&fs_info->mutually_exclusive_operation_running, 0); 3076 atomic_set(&fs_info->mutually_exclusive_operation_running, 0);
3077} 3077}
3078 3078
3079void update_ioctl_balance_args(struct btrfs_fs_info *fs_info, int lock,
3080 struct btrfs_ioctl_balance_args *bargs);
3081
3082/* 3079/*
3083 * Should be called with both balance and volume mutexes held 3080 * Should be called with both balance and volume mutexes held
3084 */ 3081 */