Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5846061ybi; Sun, 21 Jul 2019 03:51:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqySjklTz9RFhIJIhvgZI8tU0O9ao3xZfUNSgkv1mEp4TjxA39c3e5MuXwTdYyfuvuzbRh+I X-Received: by 2002:a65:41c6:: with SMTP id b6mr8846610pgq.269.1563706275754; Sun, 21 Jul 2019 03:51:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563706275; cv=none; d=google.com; s=arc-20160816; b=SDmVdh30zBfEAI4CM28GLZos/xHlbPGu6+bHGSnZynvl09/I6ceANc5qZo6NRV0Ehc 60qbp6u88tl5sdA67mkwGOqw9KLaeKrPoj8Y8XOYPzLlb5BhqoxVyNG/kAHWpG2GCtyS UCZYSZoUl+LK+5JdI1nSOq9hXb8rKCzJEiz2LinQyxZzwaF/tA8Kd6oITQe6LspCtJ9V CQae76AHw9jtX0aeY1Ksx0nBTKyczyv2Bp9C6jMCDjygaGnC3PTpctnNT+SiEhoHbOcu vhAQPCIt//pJaEshbdxbjTxgMJhtXW18TxKHH4H2lSB0eqj2qS8qQz664wtee6A8LW9x aMnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=eKFZ+EJBtskl1K3Uj/6mEks//mPAAbWUtGxEDCSbwhI=; b=ZJp/4KwDj5a9OFjYUkRK7ITKURkFLAeXLiryG9n9VkNAER0CsXvMWWxhi7tjH54q4+ 73LRnBVZwBAH9dotIgFt2zmOgufnV4KJZkaN5hzUMhBgK8qWlOzYPj5exYqXR9PMEDbo RZ3D20SoCzfOmdH7JTVU47t9RyRnUqzkPof3cUf7ASTei0+8xt4mKjDHoZ0DQ31KtBc0 ckefdflBmAgVXkC7MuhzdK/6pvSuG6BiDSgf2LWiQhliW22nLiukeeHYxrl2XhZ6JRkJ 1l37ESTPQyLD4W18yYZG0cObdLpc0ivLqeNAqsbfia61SrdwPtx1p+IFO0DoY5xdLHQo GoFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hLJyV9Dj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7si6082793pga.439.2019.07.21.03.50.56; Sun, 21 Jul 2019 03:51:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hLJyV9Dj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726366AbfGUKtY (ORCPT + 99 others); Sun, 21 Jul 2019 06:49:24 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42579 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbfGUKtY (ORCPT ); Sun, 21 Jul 2019 06:49:24 -0400 Received: by mail-pf1-f193.google.com with SMTP id q10so16006444pff.9 for ; Sun, 21 Jul 2019 03:49:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=eKFZ+EJBtskl1K3Uj/6mEks//mPAAbWUtGxEDCSbwhI=; b=hLJyV9DjZPboQ7KXy5p51iwcZvwuln7M6OXpjcGUp3WjsgHpwSD39IogMlGKXrsdcY S+M1yzJ7XZUR6LSSuqOxYvWjKNsrHyy0cQjnjwNDUIjoI+WgIkhtwb2Hx3xzoQPmUrWf rjO+HfphX62VK4lSatvndtye0xK5Fpp9OjqSmVObNLtOv8b3YahgNMlSDBjQbsuWXXFk +y7cSY4D96Lw3Af6Fr/o0QibV5aU4DYg2h9upvET5wFE+MYaTLDMM40rNSDirEoXM7Mp V0mvN5e3DOQha2i1J48HaJPCCuli4fieJDhh/ppyJ1/AqZ4efWxSg6EK68bYFgYexio3 Rzdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=eKFZ+EJBtskl1K3Uj/6mEks//mPAAbWUtGxEDCSbwhI=; b=qospySIAGB10hzNbM8JgASca13LbokCRsc0y/ogZoTQoklTBQq8wfpecgoVl12t2+m 7AgZtVb8FZ27G39WNOxv7bcJFgCX2JYfEZJqjq7NNo0NJX5ClYzZNz/TQCzDlE1tVrN7 ATMSQEqMaWqsnLx0HddmVRish/j0bMkS1u50dnIk+pkYdlmHXKdWaNWprj51SYiJ5RD1 440LrsayOnpYRd4cuBjM0xrpIo4Dosncf/nzYT+j4tNzLH4IN0onfj1s2E3c5aG7jpDx e9NqNcSFtU7Z+qC3zW62N8VAXeafQQb34UJPbwQOD9Iuq0QGbHAwLCxeJOocrA8CjLjk /Nrw== X-Gm-Message-State: APjAAAVqtlRCdZixxzMGCWlixH6ifbxOxntBmYCI9PIVupnlxbEqsgNB 4O753+lsFbHDFnmnlnA0ooE= X-Received: by 2002:a63:d04e:: with SMTP id s14mr62897813pgi.189.1563706163666; Sun, 21 Jul 2019 03:49:23 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.86.126]) by smtp.gmail.com with ESMTPSA id l4sm36276472pff.50.2019.07.21.03.49.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Jul 2019 03:49:22 -0700 (PDT) Date: Sun, 21 Jul 2019 16:19:17 +0530 From: Hariprasad Kelam To: Dave Kleikamp , jfs-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] jfs: Change return type of txLog Message-ID: <20190721104917.GA4627@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As txLog always returns 0 change return type from int to void. fix below issue reported by coccicheck /fs/jfs/jfs_txnmgr.c:1370:5-7: Unneeded variable: "rc". Return "0" on line 1417 Signed-off-by: Hariprasad Kelam --- fs/jfs/jfs_txnmgr.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c index c8ce7f1..645cd0a2 100644 --- a/fs/jfs/jfs_txnmgr.c +++ b/fs/jfs/jfs_txnmgr.c @@ -159,8 +159,8 @@ static void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, static void txAllocPMap(struct inode *ip, struct maplock * maplock, struct tblock * tblk); static void txForce(struct tblock * tblk); -static int txLog(struct jfs_log * log, struct tblock * tblk, - struct commit * cd); +static void txLog(struct jfs_log *log, struct tblock *tblk, + struct commit *cd); static void txUpdateMap(struct tblock * tblk); static void txRelease(struct tblock * tblk); static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, @@ -1256,8 +1256,7 @@ int txCommit(tid_t tid, /* transaction identifier */ * * txUpdateMap() resets XAD_NEW in XAD. */ - if ((rc = txLog(log, tblk, &cd))) - goto TheEnd; + txLog(log, tblk, &cd); /* * Ensure that inode isn't reused before @@ -1365,9 +1364,8 @@ int txCommit(tid_t tid, /* transaction identifier */ * * RETURN : */ -static int txLog(struct jfs_log * log, struct tblock * tblk, struct commit * cd) +static void txLog(struct jfs_log *log, struct tblock *tblk, struct commit *cd) { - int rc = 0; struct inode *ip; lid_t lid; struct tlock *tlck; @@ -1413,8 +1411,6 @@ static int txLog(struct jfs_log * log, struct tblock * tblk, struct commit * cd) jfs_err("UFO tlock:0x%p", tlck); } } - - return rc; } /* -- 2.7.4