]> git.baikalelectronics.ru Git - kernel.git/commit
vfio/mdpy: Use mdev_get_type_group_id()
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 6 Apr 2021 19:40:36 +0000 (16:40 -0300)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 7 Apr 2021 21:39:19 +0000 (15:39 -0600)
commit91ce78a33fa6d3add2c551c6f308d13b292c9bb4
tree2ab5a5406465c49aca383877e82ae3b00f0d0ab8
parente8bd4c8f77adc9ebf7f38538202059edcf6129e6
vfio/mdpy: Use mdev_get_type_group_id()

The mdpy_types array is parallel to the supported_type_groups array, so
the type_group_id indexes both. Instead of doing string searching just
directly index with type_group_id in all places.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Message-Id: <13-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
samples/vfio-mdev/mdpy.c