Skip to contentSkip to conversation

btrfs: Remove useless variable in write_ctree_super()

PATCH In review Rashika Kheria 2 participants 2 messages Oct 31, 2013 – Nov 2, 2013 1 message not in the archive Btrfs file system

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH v2 1/1 btrfs: Remove useless variable in write_ctree_super()

The function write_ctree_super() in disk-io.c uses variable ret to return the result of function write_all_supers(). Since, this variable serves no purpose, hence the patch removes it and returns the call of the called function.

---

This patch fixes the following issues of the previous revision- Change Subject line

 fs/btrfs/disk-io.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
fs/btrfs/disk-io.c +1 -4
index 25fb77a..cc95d55 100644
@@ -3425,10 +3425,7 @@ static int write_all_supers(struct btrfs_root *root, int max_mirrors)
 int write_ctree_super(struct btrfs_trans_handle *trans,
 		      struct btrfs_root *root, int max_mirrors)
 {
-	int ret;
-
-	ret = write_all_supers(root, max_mirrors);
-	return ret;
+	return write_all_supers(root, max_mirrors);
 }
 
 /* Drop a fs root from the radix tree and free it. */
Signature · 1 line
1.7.9.5
Reviewed-by on v2 1/1
#2 lore raw
Quoted 7 lines · Rashika Kheria

The function write_ctree_super() in disk-io.c uses variable ret to return the result of function write_all_supers(). Since, this variable serves no purpose, hence the patch removes it and returns the call of the called function.

(Also, in general, Reviewed-by should go after Signed-off-by.)

Quoted 31 lines

---

This patch fixes the following issues of the previous revision- Change Subject line

 fs/btrfs/disk-io.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
fs/btrfs/disk-io.c +1 -4
index 25fb77a..cc95d55 100644
@@ -3425,10 +3425,7 @@ static int write_all_supers(struct btrfs_root *root, int max_mirrors)
 int write_ctree_super(struct btrfs_trans_handle *trans,
 		      struct btrfs_root *root, int max_mirrors)
 {
-	int ret;
-
-	ret = write_all_supers(root, max_mirrors);
-	return ret;
+	return write_all_supers(root, max_mirrors);
 }
 
 /* Drop a fs root from the radix tree and free it. */
Signature · 6 lines
1.7.9.5

-- 
You received this message because you are subscribed to the Google Groups "opw-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.