1
0

vfio-mdev: Switch to use new generic UUID API

There are new types and helpers that are supposed to be used in new code.

As a preparation to get rid of legacy types and API functions do
the conversion here.

Cc: Kirti Wankhede <kwankhede@nvidia.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
Andy Shevchenko
2019-01-10 21:00:27 +02:00
committed by Alex Williamson
parent 8834f5600c
commit 278bca7f31
5 changed files with 19 additions and 18 deletions

View File

@@ -156,15 +156,15 @@ static const struct file_operations vd_fops = {
/* function prototypes */
static int mtty_trigger_interrupt(uuid_le uuid);
static int mtty_trigger_interrupt(const guid_t *uuid);
/* Helper functions */
static struct mdev_state *find_mdev_state_by_uuid(uuid_le uuid)
static struct mdev_state *find_mdev_state_by_uuid(const guid_t *uuid)
{
struct mdev_state *mds;
list_for_each_entry(mds, &mdev_devices_list, next) {
if (uuid_le_cmp(mdev_uuid(mds->mdev), uuid) == 0)
if (guid_equal(mdev_uuid(mds->mdev), uuid))
return mds;
}
@@ -1032,7 +1032,7 @@ static int mtty_set_irqs(struct mdev_device *mdev, uint32_t flags,
return ret;
}
static int mtty_trigger_interrupt(uuid_le uuid)
static int mtty_trigger_interrupt(const guid_t *uuid)
{
int ret = -1;
struct mdev_state *mdev_state;