* [PATCH] fs: ocfs2: dlmglue: Unneeded variable: "status"
@ 2019-07-02 18:32 Hariprasad Kelam
2019-07-05 2:06 ` Joseph Qi
0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Kelam @ 2019-07-02 18:32 UTC (permalink / raw)
To: Mark Fasheh, Joel Becker, Joseph Qi, ocfs2-devel, linux-kernel
fix below issue reported by coccicheck
fs/ocfs2/dlmglue.c:4410:5-11: Unneeded variable: "status". Return "0" on
line 4428
We can not change return type of ocfs2_downconvert_thread as its
registered as callback of kthread_create.
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
fs/ocfs2/dlmglue.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index dc987f5..1420723 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -4407,7 +4407,6 @@ static int ocfs2_downconvert_thread_should_wake(struct ocfs2_super *osb)
static int ocfs2_downconvert_thread(void *arg)
{
- int status = 0;
struct ocfs2_super *osb = arg;
/* only quit once we've been asked to stop and there is no more
@@ -4425,7 +4424,7 @@ static int ocfs2_downconvert_thread(void *arg)
}
osb->dc_task = NULL;
- return status;
+ return 0;
}
void ocfs2_wake_downconvert_thread(struct ocfs2_super *osb)
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fs: ocfs2: dlmglue: Unneeded variable: "status"
2019-07-02 18:32 [PATCH] fs: ocfs2: dlmglue: Unneeded variable: "status" Hariprasad Kelam
@ 2019-07-05 2:06 ` Joseph Qi
0 siblings, 0 replies; 2+ messages in thread
From: Joseph Qi @ 2019-07-05 2:06 UTC (permalink / raw)
To: Hariprasad Kelam, Mark Fasheh, Joel Becker, ocfs2-devel, linux-kernel
Cc: Andrew Morton
On 19/7/3 02:32, Hariprasad Kelam wrote:
> fix below issue reported by coccicheck
> fs/ocfs2/dlmglue.c:4410:5-11: Unneeded variable: "status". Return "0" on
> line 4428
>
> We can not change return type of ocfs2_downconvert_thread as its
> registered as callback of kthread_create.
>
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/dlmglue.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
> index dc987f5..1420723 100644
> --- a/fs/ocfs2/dlmglue.c
> +++ b/fs/ocfs2/dlmglue.c
> @@ -4407,7 +4407,6 @@ static int ocfs2_downconvert_thread_should_wake(struct ocfs2_super *osb)
>
> static int ocfs2_downconvert_thread(void *arg)
> {
> - int status = 0;
> struct ocfs2_super *osb = arg;
>
> /* only quit once we've been asked to stop and there is no more
> @@ -4425,7 +4424,7 @@ static int ocfs2_downconvert_thread(void *arg)
> }
>
> osb->dc_task = NULL;
> - return status;
> + return 0;
> }
>
> void ocfs2_wake_downconvert_thread(struct ocfs2_super *osb)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-05 2:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02 18:32 [PATCH] fs: ocfs2: dlmglue: Unneeded variable: "status" Hariprasad Kelam
2019-07-05 2:06 ` Joseph Qi
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).