[PATCH] ubifs/lpt_commit: remove return at end of void function

Pintu Kumar posted 1 patch 1 year ago
fs/ubifs/lpt_commit.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] ubifs/lpt_commit: remove return at end of void function
Posted by Pintu Kumar 1 year ago
Noticed that there is a useless return statement at the end of void
function dump_lpt_leb().
Just removing it.

Signed-off-by: Pintu Kumar <quic_pintu@quicinc.com>
---
 fs/ubifs/lpt_commit.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c
index aa8837e6247c..f2cb214581fd 100644
--- a/fs/ubifs/lpt_commit.c
+++ b/fs/ubifs/lpt_commit.c
@@ -1932,7 +1932,6 @@ static void dump_lpt_leb(const struct ubifs_info *c, int lnum)
 	pr_err("(pid %d) finish dumping LEB %d\n", current->pid, lnum);
 out:
 	vfree(buf);
-	return;
 }
 
 /**
-- 
2.17.1
Re: [PATCH] ubifs/lpt_commit: remove return at end of void function
Posted by Zhihao Cheng 1 year ago
在 2024/12/6 21:05, Pintu Kumar 写道:
> Noticed that there is a useless return statement at the end of void
> function dump_lpt_leb().
> Just removing it.
> 
> Signed-off-by: Pintu Kumar <quic_pintu@quicinc.com>
> ---
>   fs/ubifs/lpt_commit.c | 1 -
>   1 file changed, 1 deletion(-)

Hi, Pintu. The title of the patch should be something like "ubifs: 
dump_lpt_leb: remove return at end of void function". See 
Documentation/process/submitting-patches.rst. Otherwise,

Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>

> 
> diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c
> index aa8837e6247c..f2cb214581fd 100644
> --- a/fs/ubifs/lpt_commit.c
> +++ b/fs/ubifs/lpt_commit.c
> @@ -1932,7 +1932,6 @@ static void dump_lpt_leb(const struct ubifs_info *c, int lnum)
>   	pr_err("(pid %d) finish dumping LEB %d\n", current->pid, lnum);
>   out:
>   	vfree(buf);
> -	return;
>   }
>   
>   /**
>