Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp809536pxb; Wed, 3 Feb 2021 19:41:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpkX6kXObt59PyW4dlY4gDNgqzR9o4AQd7t3Qf0p749wqH0DnmMBahgVth6llK+3E+Jjfu X-Received: by 2002:a17:906:c08a:: with SMTP id f10mr6217505ejz.52.1612410086915; Wed, 03 Feb 2021 19:41:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612410086; cv=none; d=google.com; s=arc-20160816; b=eNa6MZhRxGazljeNE06TxgBclN8zlf3ccs5gKgJcQ554cwxSYrFdE7bwQJxDDfpwxo EG2u0+ZjtIqFYyidx1a3spQ1iU0nlsaTG+og4wTMh15CITBt0tvI4t22ovEIb/NG3mGf 9LbLFKhC0WUnywqzQmKZ/qBjQ0tQbt/JhCxjqmzm9hwoh/JAIVVOEEnlxM2TemMZQ21C TzBkJU9lfMlECFvyNuLmspjDuB4R2IrInRu9yQVkK9Rrio7hjoZY2/gmPECwBGAOzIGq 5k7nkDj4LDWKexmLmgJnTVnWNyyrXsnF7gruN7Ar2LbTMkgR5DoJwFv5RUk1UY8+hmZn xYdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=HxbjWBhGiQuSDU5Vgp7nhs7MVLFWj8IU2zDxD2zgjCU=; b=HrsuPinOMdRmepIBnGMhLLXbSf6wxub7bgRyl+PR394NFvKQdwLLqx4Y2R0nD2rtkY dM3Jw4Qv8lz4jugr8CUYj78Sc8ZWkjATTeKYjH64d94PLcDT/K7omF/ywHEWuZ1Xv/gQ 0H/6POvLFs44++XdlcfUD53QoCqk/K3V3DvwntuUpbtwPFkj+9uD5GuPzsX6wU/oDHaN aFPtg7s4Jox14/kQAyz2HjngZq66nwturGBRkKaPXy50ZP/uuEipbP17/FndGdgxn3oM lOrUVmGugtzFVTMflglduaks0SUclU5eB67Wi/b6Re7ioy0iqksTwI3On4S4IIRNqzAc N7gg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j4si2621836ejv.17.2021.02.03.19.41.03; Wed, 03 Feb 2021 19:41:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234266AbhBDDkV (ORCPT + 99 others); Wed, 3 Feb 2021 22:40:21 -0500 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:41288 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233449AbhBDDkU (ORCPT ); Wed, 3 Feb 2021 22:40:20 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0UNozYtZ_1612409975; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UNozYtZ_1612409975) by smtp.aliyun-inc.com(127.0.0.1); Thu, 04 Feb 2021 11:39:36 +0800 From: Yang Li To: shaggy@kernel.org Cc: jfs-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH] jfs: Remove unneeded return variable Date: Thu, 4 Feb 2021 11:39:34 +0800 Message-Id: <1612409974-63355-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch removes unneeded return variables, using only '0' instead. It fixes the following warning detected by coccinelle: ./fs/jfs/jfs_txnmgr.c:1370:5-7: Unneeded variable: "rc". Return "0" on line 1417 Reported-by: Abaci Robot Signed-off-by: Yang Li --- fs/jfs/jfs_txnmgr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c index dca8edd..87ef2a2 100644 --- a/fs/jfs/jfs_txnmgr.c +++ b/fs/jfs/jfs_txnmgr.c @@ -1367,7 +1367,6 @@ int txCommit(tid_t tid, /* transaction identifier */ */ static int txLog(struct jfs_log * log, struct tblock * tblk, struct commit * cd) { - int rc = 0; struct inode *ip; lid_t lid; struct tlock *tlck; @@ -1414,7 +1413,7 @@ static int txLog(struct jfs_log * log, struct tblock * tblk, struct commit * cd) } } - return rc; + return 0; } /* @@ -1425,7 +1424,6 @@ static int txLog(struct jfs_log * log, struct tblock * tblk, struct commit * cd) static int diLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, struct tlock * tlck, struct commit * cd) { - int rc = 0; struct metapage *mp; pxd_t *pxd; struct pxd_lock *pxdlock; @@ -1527,7 +1525,7 @@ static int diLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, } #endif /* _JFS_WIP */ - return rc; + return 0; } /* -- 1.8.3.1