vfio-mdev/mtty: Simplify interrupt generation
authorParav Pandit <parav@mellanox.com>
Thu, 8 Aug 2019 14:12:54 +0000 (09:12 -0500)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 19 Aug 2019 19:28:57 +0000 (13:28 -0600)
commiteee413e620f408e1e88d94b16d05f45407939d1b
tree29566a70f108c4f4ccf0f0e91f50fda92ba00cb2
parentd1abaeb3be7b5fa6d7a1fbbd2e14e3310005c4c1
vfio-mdev/mtty: Simplify interrupt generation

While generating interrupt, mdev_state is already available for which
interrupt is generated.
Instead of doing indirect way from state->device->uuid-> to searching
state linearly in linked list on every interrupt generation,
directly use the available state.

Hence, simplify the code to use mdev_state and remove unused helper
function with that.

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
samples/vfio-mdev/mtty.c