Skip to contentSkip to conversation

btrfs: backref: String formatting fixes

PATCH New Simon Quigley 1 participant 3 messages Feb 21, 2016 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 btrfs: backref: String formatting fixes

Checkpatch warns about a multi-line string

This fixes that issue and seperates the variables to another line

---
 fs/btrfs/backref.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
fs/btrfs/backref.c +3 -3
index 956fffa..a2c0595 100644
@@ -1795,9 +1795,9 @@ static int iterate_inode_refs(u64 inum, struct btrfs_root *fs_root,
 		for (cur = 0; cur < btrfs_item_size(eb, item); cur += len) {
 			name_len = btrfs_inode_ref_name_len(eb, iref);
 			/* path must be released before calling iterate()! */
-			pr_debug("following ref at offset %u for inode %llu in "
-				 "tree %llu\n", cur, found_key.objectid,
-				 fs_root->objectid);
+			pr_debug("following ref at offset %u for inode %llu in tree %llu\n",
+				cur, found_key.objectid,
+				fs_root->objectid);
 			ret = iterate(parent, name_len,
 				      (unsigned long)(iref + 1), eb, ctx);
 			if (ret)
Signature · 1 line
2.7.0
#1 lore raw

PATCH 2/3 btrfs: backref: Fixed string formatting error

Checkpatch reported an error that there was a multi-line string.

This puts the string on one line and the variables on another.

---
 fs/btrfs/backref.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
fs/btrfs/backref.c +2 -3
index a2c0595..632845a 100644
@@ -1696,9 +1696,8 @@ int iterate_extent_inodes(struct btrfs_fs_info *fs_info,
 			break;
 		ULIST_ITER_INIT(&root_uiter);
 		while (!ret && (root_node = ulist_next(roots, &root_uiter))) {
-			pr_debug("root %llu references leaf %llu, data list "
-				 "%#llx\n", root_node->val, ref_node->val,
-				 ref_node->aux);
+			pr_debug("root %llu references leaf %llu, data list %#llx\n",
+				root_node->val, ref_node->val, ref_node->aux);
 			ret = iterate_leaf_refs((struct extent_inode_elem *)
 						(uintptr_t)ref_node->aux,
 						root_node->val,
Signature · 1 line
2.7.0
#2 lore raw

PATCH 3/3 btrfs: backref: Fixed string error generated by Checkpatch

In reply to Simon Quigley

Checkpatch threw an error that this string was on two lines.

I put the string on one line and the variables on the other

---
 fs/btrfs/backref.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
fs/btrfs/backref.c +2 -3
index 632845a..6e694f7 100644
@@ -1636,9 +1636,8 @@ static int iterate_leaf_refs(struct extent_inode_elem *inode_list,
 	int ret = 0;
 
 	for (eie = inode_list; eie; eie = eie->next) {
-		pr_debug("ref for %llu resolved, key (%llu EXTEND_DATA %llu), "
-			 "root %llu\n", extent_item_objectid,
-			 eie->inum, eie->offset, root);
+		pr_debug("ref for %llu resolved, key (%llu EXTEND_DATA %llu), root %llu\n",
+			extent_item_objectid, eie->inum, eie->offset, root);
 		ret = iterate(eie->inum, eie->offset, root, ctx);
 		if (ret) {
 			pr_debug("stopping iteration for %llu due to ret=%d\n",
Signature · 1 line
2.7.0