All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Lyle <mlyle@lyle.org>
To: linux-bcache@vger.kernel.org, linux-block@vger.kernel.org
Cc: axboe@fb.com, Vasyl Gomonovych <gomonovych@gmail.com>
Subject: [416 PATCH 03/13] bcache: Use PTR_ERR_OR_ZERO()
Date: Mon,  8 Jan 2018 12:21:20 -0800	[thread overview]
Message-ID: <20180108202130.31303-4-mlyle@lyle.org> (raw)
In-Reply-To: <20180108202130.31303-1-mlyle@lyle.org>

From: Vasyl Gomonovych <gomonovych@gmail.com>

Fix ptr_ret.cocci warnings:
drivers/md/bcache/btree.c:1800:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
Reviewed-by: Michael Lyle <mlyle@lyle.org>
---
 drivers/md/bcache/btree.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
index ebb1874218e7..9e30713dbdb8 100644
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -1804,10 +1804,7 @@ static int bch_gc_thread(void *arg)
 int bch_gc_thread_start(struct cache_set *c)
 {
 	c->gc_thread = kthread_run(bch_gc_thread, c, "bcache_gc");
-	if (IS_ERR(c->gc_thread))
-		return PTR_ERR(c->gc_thread);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(c->gc_thread);
 }
 
 /* Initial partial gc */
-- 
2.14.1

  parent reply	other threads:[~2018-01-08 20:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-08 20:21 [416 PATCH 00/13] Bcache changes for 4.16 Michael Lyle
2018-01-08 20:21 ` [416 PATCH 01/13] bcache: ret IOERR when read meets metadata error Michael Lyle
2018-01-08 20:21 ` [416 PATCH 02/13] bcache: stop writeback thread after detaching Michael Lyle
2018-01-08 20:21 ` Michael Lyle [this message]
2018-01-08 20:21 ` [416 PATCH 04/13] bcache: segregate flash only volume write streams Michael Lyle
2018-01-08 20:21 ` [416 PATCH 05/13] bcache: fix wrong return value in bch_debug_init() Michael Lyle
2018-01-08 20:21 ` [416 PATCH 06/13] bcache: writeback: properly order backing device IO Michael Lyle
2018-01-08 20:21 ` [416 PATCH 07/13] bcache: allow quick writeback when backing idle Michael Lyle
2018-01-08 20:21 ` [416 PATCH 08/13] bcache: Fix, improve efficiency of closure_sync() Michael Lyle
2018-01-08 20:21 ` [416 PATCH 09/13] bcache: mark closure_sync() __sched Michael Lyle
2018-01-08 20:21 ` [416 PATCH 10/13] bcache: fix unmatched generic_end_io_acct() & generic_start_io_acct() Michael Lyle
2018-01-08 20:21 ` [416 PATCH 11/13] bcache: reduce cache_set devices iteration by devices_max_used Michael Lyle
2018-01-08 20:21 ` [416 PATCH 12/13] bcache: fix misleading error message in bch_count_io_errors() Michael Lyle
2018-01-08 20:21 ` [416 PATCH 13/13] bcache: fix writeback target calc on large devices Michael Lyle
2018-01-08 20:42 ` [416 PATCH 00/13] Bcache changes for 4.16 Jens Axboe

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=20180108202130.31303-4-mlyle@lyle.org \
    --to=mlyle@lyle.org \
    --cc=axboe@fb.com \
    --cc=gomonovych@gmail.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-block@vger.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.