* [PATCH] ocfs2/dlm: remove redundant assignment to ret
@ 2019-12-02 16:48 Colin King
2019-12-03 1:05 ` Joseph Qi
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-12-02 16:48 UTC (permalink / raw)
To: Mark Fasheh, Joel Becker, Joseph Qi, ocfs2-devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable ret is being initialized with a value that is never
read and it is being updated later with a new value. The initialization
is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
fs/ocfs2/dlm/dlmrecovery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index 064ce5bbc3f6..2734867473a6 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -1668,7 +1668,7 @@ static int dlm_lockres_master_requery(struct dlm_ctxt *dlm,
int dlm_do_master_requery(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
u8 nodenum, u8 *real_master)
{
- int ret = -EINVAL;
+ int ret;
struct dlm_master_requery req;
int status = DLM_LOCK_RES_OWNER_UNKNOWN;
--
2.24.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] ocfs2/dlm: remove redundant assignment to ret
2019-12-02 16:48 [PATCH] ocfs2/dlm: remove redundant assignment to ret Colin King
@ 2019-12-03 1:05 ` Joseph Qi
0 siblings, 0 replies; 2+ messages in thread
From: Joseph Qi @ 2019-12-03 1:05 UTC (permalink / raw)
To: Colin King, Mark Fasheh, Joel Becker, ocfs2-devel, Andrew Morton
Cc: kernel-janitors, linux-kernel
On 19/12/3 00:48, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable ret is being initialized with a value that is never
> read and it is being updated later with a new value. The initialization
> is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/dlm/dlmrecovery.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
> index 064ce5bbc3f6..2734867473a6 100644
> --- a/fs/ocfs2/dlm/dlmrecovery.c
> +++ b/fs/ocfs2/dlm/dlmrecovery.c
> @@ -1668,7 +1668,7 @@ static int dlm_lockres_master_requery(struct dlm_ctxt *dlm,
> int dlm_do_master_requery(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
> u8 nodenum, u8 *real_master)
> {
> - int ret = -EINVAL;
> + int ret;
> struct dlm_master_requery req;
> int status = DLM_LOCK_RES_OWNER_UNKNOWN;
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-03 1:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-02 16:48 [PATCH] ocfs2/dlm: remove redundant assignment to ret Colin King
2019-12-03 1:05 ` Joseph Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®