From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B29FC433ED for ; Thu, 13 May 2021 12:00:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4C14B6127A for ; Thu, 13 May 2021 12:00:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233456AbhEMMBr (ORCPT ); Thu, 13 May 2021 08:01:47 -0400 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:59577 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233201AbhEMMBk (ORCPT ); Thu, 13 May 2021 08:01:40 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R381e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=joseph.qi@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0UYlBm3y_1620907228; Received: from B-D1K7ML85-0059.local(mailfrom:joseph.qi@linux.alibaba.com fp:SMTPD_---0UYlBm3y_1620907228) by smtp.aliyun-inc.com(127.0.0.1); Thu, 13 May 2021 20:00:29 +0800 Subject: Re: [PATCH] ocfs2: remove redundant assignment to pointer queue To: Colin King , Mark Fasheh , Joel Becker , ocfs2-devel@oss.oracle.com, akpm Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210513113957.57539-1-colin.king@canonical.com> From: Joseph Qi Message-ID: Date: Thu, 13 May 2021 20:00:28 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210513113957.57539-1-colin.king@canonical.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/13/21 7:39 PM, Colin King wrote: > From: Colin Ian King > > 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 Acked-by: Joseph Qi > --- > 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; >