All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Alex Williamson <alex.williamson@redhat.com>
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
Date: Sun, 11 Nov 2018 06:44:51 +0800	[thread overview]
Message-ID: <20181110224451.GA23585@lkp-ne04> (raw)
In-Reply-To: <154180134334.31154.16289123769826098135.stgit@gimli.home>

From: kbuild test robot <fengguang.wu@intel.com>

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 <alex.williamson@redhat.com>
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
---

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)

  parent reply	other threads:[~2018-11-10 22:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-09 22:09 [PATCH] vfio/pci: Parallelize device open and release Alex Williamson
2018-11-10 22:44 ` kbuild test robot
2018-11-10 22:44 ` kbuild test robot [this message]
2018-11-13 14:42 ` Auger Eric
2018-11-13 16:34   ` Alex Williamson
2018-11-13 21:22     ` Auger Eric

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=20181110224451.GA23585@lkp-ne04 \
    --to=fengguang.wu@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=christian.ehrhardt@canonical.com \
    --cc=kbuild-all@01.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@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.