From: kbuild test robot <fengguang.wu@intel.com>
To: Tejun Heo <tj@kernel.org>
Cc: 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: [PATCH] writeback: fix simple_return.cocci warnings
Date: Wed, 7 Jan 2015 12:25:35 +0800 [thread overview]
Message-ID: <20150107042535.GA36032@athens> (raw)
In-Reply-To: <201501071230.5cIaA8Xy%fengguang.wu@intel.com>
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>
---
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);
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <fengguang.wu@intel.com>
To: Tejun Heo <tj@kernel.org>
Cc: 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: [PATCH] writeback: fix simple_return.cocci warnings
Date: Wed, 7 Jan 2015 12:25:35 +0800 [thread overview]
Message-ID: <20150107042535.GA36032@athens> (raw)
In-Reply-To: <201501071230.5cIaA8Xy%fengguang.wu@intel.com>
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>
---
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);
next parent reply other threads:[~2015-01-07 4:26 UTC|newest]
Thread overview: 4+ 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 [this message]
2015-01-07 4:25 ` [PATCH] writeback: fix simple_return.cocci warnings kbuild test robot
2015-01-07 8:41 ` Jan Kara
2015-01-07 8:41 ` Jan Kara
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=20150107042535.GA36032@athens \
--to=fengguang.wu@intel.com \
--cc=MPatlasov@parallels.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=dbasehore@chromium.org \
--cc=hannes@cmpxchg.org \
--cc=jack@suse.cz \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.