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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23827C433EF for ; Fri, 8 Oct 2021 03:43:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C39260FD7 for ; Fri, 8 Oct 2021 03:43:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242724AbhJHDpt (ORCPT ); Thu, 7 Oct 2021 23:45:49 -0400 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:33683 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236949AbhJHDpr (ORCPT ); Thu, 7 Oct 2021 23:45:47 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=joseph.qi@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0Uqv8C7f_1633664629; Received: from B-D1K7ML85-0059.local(mailfrom:joseph.qi@linux.alibaba.com fp:SMTPD_---0Uqv8C7f_1633664629) by smtp.aliyun-inc.com(127.0.0.1); Fri, 08 Oct 2021 11:43:50 +0800 Subject: Re: [PATCH] ocfs2/dlm: Remove redundant assignment of variable ret To: Colin King , akpm Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, ocfs2-devel , Mark Fasheh , Joel Becker References: <20211007233452.30815-1-colin.king@canonical.com> From: Joseph Qi Message-ID: <3d115fed-fa36-a794-60c0-9bcc5df54dc6@linux.alibaba.com> Date: Fri, 8 Oct 2021 11:43:49 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211007233452.30815-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 10/8/21 7:34 AM, Colin King wrote: > From: Colin Ian King > > The variable ret is being assigned a value that is never read, it is > updated later on with a different value. The assignment is redundant and > can be removed. > > Addresses-Coverity: ("Unused value") > Signed-off-by: Colin Ian King Reviewed-by: Joseph Qi > --- > fs/ocfs2/dlm/dlmrecovery.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c > index e24e327524f8..52ad342fec3e 100644 > --- a/fs/ocfs2/dlm/dlmrecovery.c > +++ b/fs/ocfs2/dlm/dlmrecovery.c > @@ -2698,7 +2698,6 @@ static int dlm_send_begin_reco_message(struct dlm_ctxt *dlm, u8 dead_node) > continue; > } > retry: > - ret = -EINVAL; > mlog(0, "attempting to send begin reco msg to %d\n", > nodenum); > ret = o2net_send_message(DLM_BEGIN_RECO_MSG, dlm->key, >