From: Jan Kara <jack@suse.cz>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: Tejun Heo <tj@kernel.org>,
kbuild-all@01.org, Jens Axboe <axboe@kernel.dk>,
Jan Kara <jack@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Maxim Patlasov <MPatlasov@parallels.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Derek Basehore <dbasehore@chromium.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] writeback: fix simple_return.cocci warnings
Date: Wed, 7 Jan 2015 09:41:25 +0100 [thread overview]
Message-ID: <20150107084125.GB22048@quack.suse.cz> (raw)
In-Reply-To: <20150107042535.GA36032@athens>
On Wed 07-01-15 12:25:35, Wu Fengguang wrote:
> mm/backing-dev.c:513:1-4: WARNING: end returns can be simpified and declaration on line 502 can be dropped
>
> Simplify a trivial if-return sequence. Possibly combine with a
> preceding function call.
> Generated by: scripts/coccinelle/misc/simple_return.cocci
>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Looks good.
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
>
> backing-dev.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> --- a/mm/backing-dev.c
> +++ b/mm/backing-dev.c
> @@ -499,8 +499,6 @@ static void bdi_wb_exit(struct bdi_write
>
> int bdi_init(struct backing_dev_info *bdi)
> {
> - int err;
> -
> bdi->dev = NULL;
>
> bdi->min_ratio = 0;
> @@ -510,11 +508,7 @@ int bdi_init(struct backing_dev_info *bd
> INIT_LIST_HEAD(&bdi->bdi_list);
> INIT_LIST_HEAD(&bdi->work_list);
>
> - err = bdi_wb_init(&bdi->wb, bdi);
> - if (err)
> - return err;
> -
> - return 0;
> + return bdi_wb_init(&bdi->wb, bdi);
> }
> EXPORT_SYMBOL(bdi_init);
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2015-01-07 8:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201501071230.5cIaA8Xy%fengguang.wu@intel.com>
2015-01-07 4:25 ` kbuild test robot
2015-01-07 8:41 ` Jan Kara [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150107084125.GB22048@quack.suse.cz \
--to=jack@suse.cz \
--cc=MPatlasov@parallels.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=dbasehore@chromium.org \
--cc=fengguang.wu@intel.com \
--cc=hannes@cmpxchg.org \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox