* [PATCH] ocfs2: remove redundant assignment to pointer queue
@ 2021-05-13 11:39 Colin King
2021-05-13 12:00 ` Joseph Qi
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-05-13 11:39 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 pointer queue 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/dlmmaster.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
index 4960a6de768d..9b88219febb5 100644
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -2977,7 +2977,7 @@ static u8 dlm_pick_migration_target(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res)
{
enum dlm_lockres_list idx;
- struct list_head *queue = &res->granted;
+ struct list_head *queue;
struct dlm_lock *lock;
int noderef;
u8 nodenum = O2NM_MAX_NODES;
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ocfs2: remove redundant assignment to pointer queue
2021-05-13 11:39 [PATCH] ocfs2: remove redundant assignment to pointer queue Colin King
@ 2021-05-13 12:00 ` Joseph Qi
0 siblings, 0 replies; 2+ messages in thread
From: Joseph Qi @ 2021-05-13 12:00 UTC (permalink / raw)
To: Colin King, Mark Fasheh, Joel Becker, ocfs2-devel, akpm
Cc: kernel-janitors, linux-kernel
On 5/13/21 7:39 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The pointer queue 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>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> fs/ocfs2/dlm/dlmmaster.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
> index 4960a6de768d..9b88219febb5 100644
> --- a/fs/ocfs2/dlm/dlmmaster.c
> +++ b/fs/ocfs2/dlm/dlmmaster.c
> @@ -2977,7 +2977,7 @@ static u8 dlm_pick_migration_target(struct dlm_ctxt *dlm,
> struct dlm_lock_resource *res)
> {
> enum dlm_lockres_list idx;
> - struct list_head *queue = &res->granted;
> + struct list_head *queue;
> struct dlm_lock *lock;
> int noderef;
> u8 nodenum = O2NM_MAX_NODES;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-13 12:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13 11:39 [PATCH] ocfs2: remove redundant assignment to pointer queue Colin King
2021-05-13 12:00 ` 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).