Received: by 10.223.164.202 with SMTP id h10csp2298579wrb; Mon, 27 Nov 2017 15:06:37 -0800 (PST) X-Google-Smtp-Source: AGs4zMa3fFDDVZm2ouGJi+PX8TVal6NAA0mTMqKJ3CKmRWKcdi5A/FO26vth3e4Hr+TFnoGHIIMv X-Received: by 10.98.156.204 with SMTP id u73mr29620685pfk.8.1511823997576; Mon, 27 Nov 2017 15:06:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511823997; cv=none; d=google.com; s=arc-20160816; b=tqxHH1YxYoJmRmeM4Y+V6NvaODrwWcNq6nQUjcY9P1SMHt+RYH4GvvMOsxDkKRlQkO qgq7SNbE355niTgBaKkUamfcLAXzY6n0U7trneI13Ojcuz3k09feWSx5RMp1b19qQc9R gC5XOTlimN4V5XzSx2HVt7ndFJ1DnAT1MJsms1vrHfokqidy2A4olAojK1CCPoNCZVkK pmOaI43q0OxSXtZ+zge0eKkNJhVxiy+1KHA5wGb+14wcIcwsAuzJghvus//Pqfzq/DGf wYteCsdWsxkk72XxzaKt/jCeCNu8/Eo1fUQpbAzaQGVCxH2eaxFVi9U4GP0De/xKYW1x apbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=3OWqxVyi4FfXbrumSBoOSVs01qyRBeRNFOIS5Gt0790=; b=me8RQH386M0k8vI4OpJcZQqjwrq5UzgfZONMYK8iIA3pQ6dHivCw4phvBfcNb3GCbM UMX6gbjjLvCEyjDaj1DLcPW/UcFoL4d0/JN9ZmcVZYOrJwB2HoMsInTkbfjRW7gIUAmL GiW7gAjw6auzbwmtS/Ki33pKUxjJbumPC5dm9v3d5V0jv0Wy2rO43uagzl5Js2pPl/NC UISO0mwEGwsOnezYWTYSOkhsufoLRjYW5LUDPTMzzNFXmREg0PCQpd4S+0DKaxKJ2jyZ sH4h60wcCFpaqNA943hhjwjbAfmnZaar1VXQ//YDZCbSjx97W9Ifj0xtMmZWye9S9ChR OOwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=D/t3GKwK; 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=NONE 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 t10si12849191plh.762.2017.11.27.15.06.25; Mon, 27 Nov 2017 15:06:37 -0800 (PST) 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=D/t3GKwK; 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=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753147AbdK0XFN (ORCPT + 78 others); Mon, 27 Nov 2017 18:05:13 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:34369 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752459AbdK0XFK (ORCPT ); Mon, 27 Nov 2017 18:05:10 -0500 Received: by mail-lf0-f67.google.com with SMTP id i14so34757677lfc.1; Mon, 27 Nov 2017 15:05:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=3OWqxVyi4FfXbrumSBoOSVs01qyRBeRNFOIS5Gt0790=; b=D/t3GKwKxyN1IkorOYRe4wPj2l6GjTz/Zc/8iYPIq9ENHwOsi2YN1IfC8Hdy3P6jAc rRKBcJH+vlS7iJ+lo5tFS8owd9sqxS2LCUWCJ/2zd6aOuWdK8L+2L54+pqn4/CQLfLWW +BFReL7e3d0IUtmipeN9+dyog+Nz1zqHAU3LM+WRy2nc2ua4j+qANoOnBPoAmmhu3XnP SqAj+gZPAJCo8MOrL0OWXQwJimdtAWOJHojSHlnRs0LFrK9Nj/bf69aeN0gWlv/1eoZ3 6UMRe4tqna1mnJGp5UjtodDQ/gQoujJOawtS8o5e2QM+QsnncWMG4RzWl2xOnABRizXM 0wGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3OWqxVyi4FfXbrumSBoOSVs01qyRBeRNFOIS5Gt0790=; b=ClyH0Cj8HQey+qlYpifv5LtiL43BQfRtVqaXIr2JzVJYvEGnkKt8CZ8rNN2y+eA3kZ 0/Yd3GvoiBEsotaexFIwUUB6wWvzembD3y0LlaOyd6aP6R9NpO2RKqbLVsECFGKKV2r4 cwS61ZmSifRlfHBPe+yeKLaJryterBsc+VI9H+5VlDKFqgnO3V4uSvNFNGp5nR7qwxBs vQyFHr+0IbNTaJTXhM/1ooxCuBAf9Or69sixOgg2qA2IjrHPPf99jHCCGS9NzdZidIJf ALNNjH+Dn+qsWDXqJ/B8ROZwO2SPIzAUiXi8QqZlr4ZP8d6zvVqFPB+SJlVi46Br/0tS FSXg== X-Gm-Message-State: AJaThX6ghAEYMoaQSDbVRuNqenA04bHdFUcXTXCfcTen5XbyYS9rUjDL Cub+xwImKKUOo2X0/QB92z4= X-Received: by 10.46.1.205 with SMTP id f74mr17512362lji.16.1511823909006; Mon, 27 Nov 2017 15:05:09 -0800 (PST) Received: from localhost.localdomain ([195.254.138.66]) by smtp.gmail.com with ESMTPSA id a15sm5480540ljb.11.2017.11.27.15.05.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Nov 2017 15:05:08 -0800 (PST) From: Vasyl Gomonovych To: kent.overstreet@gmail.com, shli@kernel.org, mingo@kernel.org, axboe@fb.com, gregkh@linuxfoundation.org, kstewart@linuxfoundation.org, linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org Cc: linux-kernel@vger.kernel.org, gomonovych@gmail.com Subject: [PATCH] bcache: Use PTR_ERR_OR_ZERO() Date: Tue, 28 Nov 2017 00:05:00 +0100 Message-Id: <1511823900-3151-1-git-send-email-gomonovych@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 658c54b3b07a..f43e49979cb2 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c @@ -1797,10 +1797,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 */ -- 1.9.1 From 1585324386575419251@xxx Tue Nov 28 15:32:30 +0000 2017 X-GM-THRID: 1585324386575419251 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread