Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2428342imu; Sat, 10 Nov 2018 14:48:39 -0800 (PST) X-Google-Smtp-Source: AJdET5eFcZk1YJ2Pxb1LFU5L27cPqjFacc2Kcq+vvrA5l95WDJICRh7laPiDNO/aD89qGqvuYbMk X-Received: by 2002:a17:902:4281:: with SMTP id h1-v6mr14326553pld.114.1541890118982; Sat, 10 Nov 2018 14:48:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541890118; cv=none; d=google.com; s=arc-20160816; b=vEfkQlYhh9BD0FP17ZgH7MJBpBOuLUTUtYRYpzm8h5/2oDJTjni5N0lGhwQDetEnxQ 29d/Q4oRvY5t5uGpLKjjYc2Z17s9UDJwCaN2QXUx5BjoO1RB2wsOuUDm6UvqtbXhIqmi c/puNls1YROGOM3m7TiU8FpMyGwkXfiVeUi65y6xh6O7d74cg+xdjVpdpSQlZjojunKT rCseHbfeWCwCgBrsZVg4b52WecAPeDIZaMfcnAi1MsgvsiUAvlPlBm5k7oSBdVGzIL0C Yjb7ONFESLrGminbX+uB+MWS3zGUNNhWuTlJfHQQ43fMMU8EUrb5rG3xj6MF0yT8UqgK d9rg== 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=cDZi7mu1zLZ7+vQ5t2Cxs4cf5WKtZ6ox2BThrpmm9vo=; b=Y0CANzAD/bO/5YyF3WEOh2M+bfB86OiOwbLsyYLzpkGk3CI8mIuljT0vqBPX5BO1mP nnrr5rz+na0wocu7Piq2TdwbrY0zeQOdZKPfj5ugJhA4ec0+2SyEvmuhqMESGnkajW9G VFBWVUF7xHOCL8M41rKbdbsMc2Sjrt+XqrLoL0hgaDFha/Jz7OIQUas/Wb7gNxiWkQPR BBRRlxuw03Y4h/PbOi/zoisKRMiYM5sJDhtaMqnssnUHxBT+gJwsfktQ42OVPpY9Z4pK K1opi60zplpKD2gEJxjxEpu4uXx5j5A7LhVHEhzNknriovq50aoWXaz1jUA3GTQm4/44 j+CA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u2-v6si12330678plq.268.2018.11.10.14.48.23; Sat, 10 Nov 2018 14:48:38 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727351AbeKKIc0 (ORCPT + 99 others); Sun, 11 Nov 2018 03:32:26 -0500 Received: from mga07.intel.com ([134.134.136.100]:63594 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726082AbeKKIcZ (ORCPT ); Sun, 11 Nov 2018 03:32:25 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Nov 2018 14:45:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,489,1534834800"; d="scan'208";a="90157746" Received: from lkp-server01.sh.intel.com (HELO lkp-server01) ([10.239.97.150]) by orsmga006.jf.intel.com with ESMTP; 10 Nov 2018 14:45:49 -0800 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1gLc0i-000GQI-Kq; Sun, 11 Nov 2018 06:45:48 +0800 Date: Sun, 11 Nov 2018 06:44:51 +0800 From: kbuild test robot To: Alex Williamson Cc: kbuild-all@01.org, alex.williamson@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, christian.ehrhardt@canonical.com Subject: [PATCH] vfio/pci: fix ptr_ret.cocci warnings Message-ID: <20181110224451.GA23585@lkp-ne04> References: <154180134334.31154.16289123769826098135.stgit@gimli.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <154180134334.31154.16289123769826098135.stgit@gimli.home> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kbuild test robot drivers/vfio/pci/vfio_pci.c:1396:8-14: 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 Fixes: 25e57457f6f2 ("vfio/pci: Parallelize device open and release") CC: Alex Williamson Signed-off-by: kbuild test robot --- url: https://github.com/0day-ci/linux/commits/Alex-Williamson/vfio-pci-Parallelize-device-open-and-release/20181111-025016 base: https://github.com/awilliam/linux-vfio.git next vfio_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/vfio/pci/vfio_pci.c +++ b/drivers/vfio/pci/vfio_pci.c @@ -1393,7 +1393,7 @@ static int vfio_pci_reflck_attach(struct mutex_unlock(&reflck_lock); - return IS_ERR(vdev->reflck) ? PTR_ERR(vdev->reflck) : 0; + return PTR_ERR_OR_ZERO(vdev->reflck); } static void vfio_pci_reflck_release(struct kref *kref)