Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1628355 > unrolled thread

[PATCH v1 4/8] vfio-mdev: Use recently introduced uuid_le_cmp_p{p}()

Started byAndy Shevchenko <andriy.shevchenko@linux.intel.com>
First post2017-04-21 17:30 +0200
Last post2017-04-21 17:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v1 4/8] vfio-mdev: Use recently introduced uuid_le_cmp_p{p}() Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-04-21 17:30 +0200

#1628355 — [PATCH v1 4/8] vfio-mdev: Use recently introduced uuid_le_cmp_p{p}()

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2017-04-21 17:30 +0200
Subject[PATCH v1 4/8] vfio-mdev: Use recently introduced uuid_le_cmp_p{p}()
Message-ID<tyIFs-7rg-3@gated-at.bofh.it>
Recently introduced helpers take pointers to uuid_{be|le} instead of
reference.

Using them makes code less ugly.

Cc: Kirti Wankhede <kwankhede@nvidia.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/vfio/mdev/mdev_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c
index 126991046eb7..82de886855d8 100644
--- a/drivers/vfio/mdev/mdev_core.c
+++ b/drivers/vfio/mdev/mdev_core.c
@@ -75,7 +75,7 @@ static int _find_mdev_device(struct device *dev, void *data)
 
 	mdev = to_mdev_device(dev);
 
-	if (uuid_le_cmp(mdev->uuid, *(uuid_le *)data) == 0)
+	if (uuid_le_cmp_p(data, mdev->uuid) == 0)
 		return 1;
 
 	return 0;
-- 
2.11.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web