Skip to contentSkip to conversation

Btrfs: ctree: added lines after variable declarations

PATCH In review Philippe Loctaux 3 participants 8 messages Feb 21, 2016 – Feb 22, 2016 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Btrfs: ctree: added lines after variable declarations

Added lines after variable declarations, fixing 22 checkpatch warnings.

---
 fs/btrfs/ctree.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
fs/btrfs/ctree.c +23 -0
index 769e0ff..c9fd42d 100644
@@ -45,6 +45,7 @@ static int tree_mod_log_free_eb(struct btrfs_fs_info *fs_info,
 struct btrfs_path *btrfs_alloc_path(void)
 {
 	struct btrfs_path *path;
+
 	path = kmem_cache_zalloc(btrfs_path_cachep, GFP_NOFS);
 	return path;
 }
@@ -56,6 +57,7 @@ struct btrfs_path *btrfs_alloc_path(void)
 noinline void btrfs_set_path_blocking(struct btrfs_path *p)
 {
 	int i;
+
 	for (i = 0; i < BTRFS_MAX_LEVEL; i++) {
 		if (!p->nodes[i] || !p->locks[i])
 			continue;
@@ -873,6 +875,7 @@ tree_mod_log_eb_move(struct btrfs_fs_info *fs_info, struct extent_buffer *dst,
 		     int dst_offset, int src_offset, int nr_items)
 {
 	int ret;
+
 	ret = tree_mod_log_insert_move(fs_info, dst, dst_offset, src_offset,
 				       nr_items, GFP_NOFS);
 	BUG_ON(ret < 0);
@@ -943,6 +946,7 @@ tree_mod_log_set_root_pointer(struct btrfs_root *root,
 			      int log_removal)
 {
 	int ret;
+
 	ret = tree_mod_log_insert_root(root->fs_info, root->node,
 				       new_root_node, GFP_NOFS, log_removal);
 	BUG_ON(ret < 0);
@@ -1734,6 +1738,7 @@ static inline unsigned int leaf_data_end(struct btrfs_root *root,
 					 struct extent_buffer *leaf)
 {
 	u32 nr = btrfs_header_nritems(leaf);
+
 	if (nr == 0)
 		return BTRFS_LEAF_DATA_SIZE(root);
 	return btrfs_item_offset_nr(leaf, nr - 1);
@@ -2011,6 +2016,7 @@ static noinline int balance_level(struct btrfs_trans_handle *trans,
 			right = NULL;
 		} else {
 			struct btrfs_disk_key right_key;
+
 			btrfs_node_key(right, &right_key, 0);
 			tree_mod_log_set_node_key(root->fs_info, parent,
 						  pslot + 1, 0);
@@ -2056,6 +2062,7 @@ static noinline int balance_level(struct btrfs_trans_handle *trans,
 	} else {
 		/* update the parent key to reflect our changes */
 		struct btrfs_disk_key mid_key;
+
 		btrfs_node_key(mid, &mid_key, 0);
 		tree_mod_log_set_node_key(root->fs_info, parent,
 					  pslot, 0);
@@ -2154,6 +2161,7 @@ static noinline int push_nodes_for_insert(struct btrfs_trans_handle *trans,
 			ret = wret;
 		if (wret == 0) {
 			struct btrfs_disk_key disk_key;
+
 			orig_slot += left_nr;
 			btrfs_node_key(mid, &disk_key, 0);
 			tree_mod_log_set_node_key(root->fs_info, parent,
@@ -2382,6 +2390,7 @@ static noinline void unlock_up(struct btrfs_path *path, int level,
 		}
 		if (!no_skips && path->keep_locks) {
 			u32 nritems;
+
 			t = path->nodes[i];
 			nritems = btrfs_header_nritems(t);
 			if (nritems < 1 || path->slots[i] >= nritems - 1) {
@@ -2529,6 +2538,7 @@ setup_nodes_for_search(struct btrfs_trans_handle *trans,
 		       int *write_lock_level)
 {
 	int ret;
+
 	if ((p->search_for_split || ins_len > 0) && btrfs_header_nritems(b) >=
 	    BTRFS_NODEPTRS_PER_BLOCK(root) - 3) {
 		int sret;
@@ -2825,6 +2835,7 @@ cow_done:
 
 		if (level != 0) {
 			int dec = 0;
+
 			if (ret && slot > 0) {
 				dec = 1;
 				slot -= 1;
@@ -2993,6 +3004,7 @@ again:
 
 		if (level != 0) {
 			int dec = 0;
+
 			if (ret && slot > 0) {
 				dec = 1;
 				slot -= 1;
@@ -3139,6 +3151,7 @@ static void fixup_low_keys(struct btrfs_fs_info *fs_info,
 
 	for (i = level; i < BTRFS_MAX_LEVEL; i++) {
 		int tslot = path->slots[i];
+
 		if (!path->nodes[i])
 			break;
 		t = path->nodes[i];
@@ -3574,6 +3587,7 @@ noinline int btrfs_leaf_free_space(struct btrfs_root *root,
 {
 	int nritems = btrfs_header_nritems(leaf);
 	int ret;
+
 	ret = BTRFS_LEAF_DATA_SIZE(root) - leaf_space_used(leaf, 0, nritems);
 	if (ret < 0) {
 		btrfs_crit(root->fs_info,
@@ -3630,6 +3644,7 @@ static noinline int __push_leaf_right(struct btrfs_trans_handle *trans,
 				break;
 			if (path->slots[0] == i) {
 				int space = btrfs_leaf_free_space(root, left);
+
 				if (space + push_space * 2 > free_space)
 					break;
 			}
@@ -3849,6 +3864,7 @@ static noinline int __push_leaf_left(struct btrfs_trans_handle *trans,
 				break;
 			if (path->slots[0] == i) {
 				int space = btrfs_leaf_free_space(root, right);
+
 				if (space + push_space * 2 > free_space)
 					break;
 			}
@@ -4488,6 +4504,7 @@ int btrfs_split_item(struct btrfs_trans_handle *trans,
 		     unsigned long split_offset)
 {
 	int ret;
+
 	ret = setup_leaf_for_split(trans, root, path,
 				   sizeof(struct btrfs_item));
 	if (ret)
@@ -4578,6 +4595,7 @@ void btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path,
 	/* first correct the data pointers */
 	for (i = slot; i < nritems; i++) {
 		u32 ioff;
+
 		item = btrfs_item_nr(i);
 
 		ioff = btrfs_token_item_offset(leaf, item, &token);
@@ -4592,6 +4610,7 @@ void btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path,
 			      data_end, old_data_start + new_size - data_end);
 	} else {
 		struct btrfs_disk_key disk_key;
+
 		u64 offset;
 
 		btrfs_item_key(leaf, &disk_key, slot);
@@ -4679,6 +4698,7 @@ void btrfs_extend_item(struct btrfs_root *root, struct btrfs_path *path,
 	/* first correct the data pointers */
 	for (i = slot; i < nritems; i++) {
 		u32 ioff;
+
 		item = btrfs_item_nr(i);
 
 		ioff = btrfs_token_item_offset(leaf, item, &token);
@@ -4993,6 +5013,7 @@ int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root,
 		}
 	} else {
 		int used = leaf_space_used(leaf, 0, nritems);
+
 		if (slot == 0) {
 			struct btrfs_disk_key disk_key;
 
@@ -5234,6 +5255,7 @@ static int tree_move_next_or_upnext(struct btrfs_root *root,
 {
 	int ret = 0;
 	int nritems;
+
 	nritems = btrfs_header_nritems(path->nodes[*level]);
 
 	path->slots[*level]++;
@@ -5598,6 +5620,7 @@ next:
 			int ret;
 			int orig_lowest;
 			struct btrfs_key cur_key;
+
 			if (level + 1 >= BTRFS_MAX_LEVEL ||
 			    !path->nodes[level + 1])
 				return 1;
Signature · 1 line
2.7.1
#1 lore raw
Quoted 1 line · Philippe Loctaux

Added lines after variable declarations, fixing 22 checkpatch warnings.

[]

fs/btrfs/ctree.c

Quoted 1 line
fs/btrfs/ctree.c +0 -0

[]

fs/btrfs/ctree.c void btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path, · line 4614

Quoted 6 lines
fs/btrfs/ctree.c +1 -0
@@ -4592,6 +4610,7 @@ void btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path,
  			      data_end, old_data_start + new_size - data_end);
  	} else {
  		struct btrfs_disk_key disk_key;
+
  		u64 offset;

Overzealous here.
No additional blank line required.

#2 lore raw

Is there no need of additional blank line here particulary or in all lines that I changed?

--
Philippe Loctaux
[email protected]

Quoted 19 lines · Joe Perches
Quoted 1 line · Philippe Loctaux

Added lines after variable declarations, fixing 22 checkpatch warnings.

[]

fs/btrfs/ctree.c

Quoted 1 line
fs/btrfs/ctree.c +0 -0

[]

fs/btrfs/ctree.c void btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path, · line 4614

Quoted 6 lines
fs/btrfs/ctree.c +1 -0
@@ -4592,6 +4610,7 @@ void btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path,
  			      data_end, old_data_start + new_size - data_end);
  	} else {
  		struct btrfs_disk_key disk_key;
+
  		u64 offset;

Overzealous here.
No additional blank line required.

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

#3 lore raw
Quoted 2 lines · Philippe Loctaux

Is there no need of additional blank line here particulary or in all lines that I changed?

Please don't top post and just here.

Quoted 15 lines · Joe Perches
Quoted 14 lines · Philippe Loctaux
Quoted 1 line

Added lines after variable declarations, fixing 22 checkpatch warnings.

[]

fs/btrfs/ctree.c

Quoted 1 line
fs/btrfs/ctree.c +0 -0

[]

fs/btrfs/ctree.c void btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path, · line 4614

Quoted 6 lines
fs/btrfs/ctree.c +1 -0
@@ -4592,6 +4610,7 @@ void btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path,
  			      data_end, old_data_start + new_size - data_end);
  	} else {
  		struct btrfs_disk_key disk_key;
+
  		u64 offset;

Overzealous here.
No additional blank line required.

#4 lore raw

Hi,
I'm really sorry, but I don't understand what you're trying to mean. Could you simplify your sentence please (since I'm not english native)? I'd really apreciate that, thanks :)

--
Philippe Loctaux
[email protected]

Quoted 24 lines · Joe Perches
Quoted 2 lines · Philippe Loctaux

Is there no need of additional blank line here particulary or in all lines that I changed?

Please don't top post and just here.

Quoted 6 lines · Joe Perches
Quoted 5 lines · Philippe Loctaux
Quoted 1 line

Added lines after variable declarations, fixing 22 checkpatch warnings.

[]

fs/btrfs/ctree.c

Quoted 1 line
fs/btrfs/ctree.c +0 -0

[]

Quoted 9 lines
Quoted 9 lines

fs/btrfs/ctree.c void btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path, · line 4614

Quoted 6 lines
fs/btrfs/ctree.c +1 -0
@@ -4592,6 +4610,7 @@ void btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path,
  			      data_end, old_data_start + new_size - data_end);
  	} else {
  		struct btrfs_disk_key disk_key;
+
  		u64 offset;

Overzealous here.
No additional blank line required.

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

#5 lore raw
Quoted 5 lines · Philippe Loctaux

Hi,
I'm really sorry, but I don't understand what you're trying to mean. Could you simplify your sentence please (since I'm not english native)?
I'd really apreciate that, thanks :)

Please do not put your reply at the top of the email. (top-post)

This was the only instance I found where your modifications were inappropriate (just here)

#6 lore raw

Oh okay, thanks :)

--
Philippe Loctaux
[email protected]

Quoted 12 lines · Joe Perches
Quoted 5 lines · Philippe Loctaux

Hi,
I'm really sorry, but I don't understand what you're trying to mean. Could you simplify your sentence please (since I'm not english native)?
I'd really apreciate that, thanks :)

Please do not put your reply at the top of the email. (top-post)

This was the only instance I found where your modifications were inappropriate (just here)

#7 lore raw

Philippe Loctaux posted on Mon, 22 Feb 2016 08:22:10 +0100 as excerpted:

Quoted 11 lines

Oh okay, thanks :)

Quoted 8 lines · Joe Perches
Quoted 5 lines · Philippe Loctaux

Hi,
I'm really sorry, but I don't understand what you're trying to mean. Could you simplify your sentence please (since I'm not english native)?
I'd really apreciate that, thanks :)

Please do not put your reply at the top of the email. (top-post)

But... you still did it!

(OTOH, this is an example of replying in context, save for the small problem that the message I replied to was top-posted, making things out of order for readers both of this message and of further messages that maintain the quotes in that order. Had you replied at the bottom, or interleaved in context under each point you're replying to, further replies and their context would have been far clearer for others reading and replying.)

Signature · 3 lines
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman