linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/btrfs: remove redundant ret variable
@ 2022-01-11  1:57 cgel.zte
  2022-01-11  7:12 ` Nikolay Borisov
  2022-01-24 20:19 ` David Sterba
  0 siblings, 2 replies; 3+ messages in thread
From: cgel.zte @ 2022-01-11  1:57 UTC (permalink / raw)
  To: clm
  Cc: josef, dsterba, linux-btrfs, linux-kernel, Minghao Chi,
	Zeal Robot, CGEL ZTE

From: Minghao Chi <chi.minghao@zte.com.cn>

Return value from fs_path_add_path() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
---
 fs/btrfs/send.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 3fc144b8c0d8..4ed13461cb07 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -528,14 +528,10 @@ static int fs_path_add_from_extent_buffer(struct fs_path *p,
 
 static int fs_path_copy(struct fs_path *p, struct fs_path *from)
 {
-	int ret;
-
 	p->reversed = from->reversed;
 	fs_path_reset(p);
 
-	ret = fs_path_add_path(p, from);
-
-	return ret;
+	return fs_path_add_path(p, from);
 }
 
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fs/btrfs: remove redundant ret variable
  2022-01-11  1:57 [PATCH] fs/btrfs: remove redundant ret variable cgel.zte
@ 2022-01-11  7:12 ` Nikolay Borisov
  2022-01-24 20:19 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: Nikolay Borisov @ 2022-01-11  7:12 UTC (permalink / raw)
  To: cgel.zte, clm
  Cc: josef, dsterba, linux-btrfs, linux-kernel, Minghao Chi, Zeal Robot



On 11.01.22 г. 3:57, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> Return value from fs_path_add_path() directly instead
> of taking this in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>

Reviewed-by: Nikolay Borisov <nborisov@suse.com>

<snip>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fs/btrfs: remove redundant ret variable
  2022-01-11  1:57 [PATCH] fs/btrfs: remove redundant ret variable cgel.zte
  2022-01-11  7:12 ` Nikolay Borisov
@ 2022-01-24 20:19 ` David Sterba
  1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2022-01-24 20:19 UTC (permalink / raw)
  To: cgel.zte
  Cc: clm, josef, dsterba, linux-btrfs, linux-kernel, Minghao Chi, Zeal Robot

On Tue, Jan 11, 2022 at 01:57:16AM +0000, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> Return value from fs_path_add_path() directly instead
> of taking this in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>

Added to misc-next, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-24 20:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11  1:57 [PATCH] fs/btrfs: remove redundant ret variable cgel.zte
2022-01-11  7:12 ` Nikolay Borisov
2022-01-24 20:19 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).