Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp912273ybi; Wed, 3 Jul 2019 06:33:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDKJ6c7wMjm3jY3AE82+ADqvZISIo9PyhBczqFv3G6bKWunW/m2Zl9wZnUpSIc0aA3iHJg X-Received: by 2002:a17:90a:9b88:: with SMTP id g8mr13012425pjp.100.1562160830341; Wed, 03 Jul 2019 06:33:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562160830; cv=none; d=google.com; s=arc-20160816; b=c7HOKB1vFL06wxzn0KeaZxNuZAepOKkvHOX0Q+8jR2AUDHGCU0nQJaFEG5HzJFFa3n 6YiTj7+lyYsHiBnrIKIaPKSMxXwTOvtHTe2F0IZb7+W9COS3+HlfHE4U91GcwX6wvgGJ LG0ekGoSHCumeVq1hjXh9IC6mYjkB3ajwWrnJNczTUopP3K8I2vZVpVeViEB0r6mg3ht XXr6M29FIdNpk26BZolKrjli8NKCylGsL0k9wycZEFoPBX/iGI1DfDFdER4HLZbWB9Zm YOS2ihbQeHIuyzevjlYQ1TthcNZ5Jd/qjlS9oXWQ6PvexlKtxqVjyms/reVZJnStImsa iGOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=QKwLvZUQ4OPmfAfiVxN3RjxQSr0IktGTOKiSGf+jhFE=; b=0VeMM8H8M6DBOisX9kmx/aKkwI3hqu/pAtTfvEp9fSk0lukfbAtrz6PcT7DmvLlFJs RaLmSEmg/o3HG+iR/YqEtI0cD77gqrMdJ4aj5SGXBm78kulctFslzGmOFsy1rkTgH6kN b+KauWJM64mGWQPddlZmHj44FLRmiU1Wd16pVCSJbI8cyJ9igoUpaf2JkpGDu7EErHIG n+9nPGdPusvwApeCzL9pDgtr63cLBUt9rWBwdVuzJUtjWkS6ibeh33X1sp/dF8SppIR9 E3lxr5rNLp7ur0ubsOEdOxX/iQEu0a2OkatDwhCSX6O/SVdSTLulWjWOn16bCfSMNV7t KqfA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n13si2353285pgv.304.2019.07.03.06.33.34; Wed, 03 Jul 2019 06:33:50 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726574AbfGCNdP (ORCPT + 99 others); Wed, 3 Jul 2019 09:33:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:40614 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725847AbfGCNdP (ORCPT ); Wed, 3 Jul 2019 09:33:15 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id ED4ACB76E; Wed, 3 Jul 2019 13:33:13 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 818F91E0D71; Wed, 3 Jul 2019 15:33:13 +0200 (CEST) Date: Wed, 3 Jul 2019 15:33:13 +0200 From: Jan Kara To: Hariprasad Kelam Cc: Jan Kara , Andrew Morton , Arnd Bergmann , Bharath Vedartham , reiserfs-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fs: reiserfs: journal: Change return type of dirty_one_transaction Message-ID: <20190703133313.GA16008@quack2.suse.cz> References: <20190702175430.GA5882@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190702175430.GA5882@hari-Inspiron-1545> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 02-07-19 23:24:30, Hariprasad Kelam wrote: > Change return type of dirty_one_transaction from int to void. As this > function always return success. > > Fixes below issue reported by coccicheck > fs/reiserfs/journal.c:1690:5-8: Unneeded variable: "ret". Return "0" on > line 1719 > > Signed-off-by: Hariprasad Kelam I can see Andrew already picked up the cleanup. The patch looks good to me. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/reiserfs/journal.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c > index 36346dc..4517a13 100644 > --- a/fs/reiserfs/journal.c > +++ b/fs/reiserfs/journal.c > @@ -94,7 +94,7 @@ static int journal_join(struct reiserfs_transaction_handle *th, > struct super_block *sb); > static void release_journal_dev(struct super_block *super, > struct reiserfs_journal *journal); > -static int dirty_one_transaction(struct super_block *s, > +static void dirty_one_transaction(struct super_block *s, > struct reiserfs_journal_list *jl); > static void flush_async_commits(struct work_struct *work); > static void queue_log_writer(struct super_block *s); > @@ -1682,12 +1682,11 @@ static int write_one_transaction(struct super_block *s, > } > > /* used by flush_commit_list */ > -static int dirty_one_transaction(struct super_block *s, > +static void dirty_one_transaction(struct super_block *s, > struct reiserfs_journal_list *jl) > { > struct reiserfs_journal_cnode *cn; > struct reiserfs_journal_list *pjl; > - int ret = 0; > > jl->j_state |= LIST_DIRTY; > cn = jl->j_realblock; > @@ -1716,7 +1715,6 @@ static int dirty_one_transaction(struct super_block *s, > } > cn = cn->next; > } > - return ret; > } > > static int kupdate_transactions(struct super_block *s, > -- > 2.7.4 > -- Jan Kara SUSE Labs, CR