mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
vdpa: Use simpler version of ida allocation
vdpa doesn't have any specific need to define start and end range of the device index. Hence use the simper version of the ida allocator. Signed-off-by: Parav Pandit <parav@nvidia.com> Reviewed-by: Eli Cohen <elic@nvidia.com> Acked-by: Jason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/20201112064005.349268-3-parav@nvidia.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
476c135e32
commit
418eddef05
@ -89,7 +89,7 @@ struct vdpa_device *__vdpa_alloc_device(struct device *parent,
|
||||
if (!vdev)
|
||||
goto err;
|
||||
|
||||
err = ida_simple_get(&vdpa_index_ida, 0, 0, GFP_KERNEL);
|
||||
err = ida_alloc(&vdpa_index_ida, GFP_KERNEL);
|
||||
if (err < 0)
|
||||
goto err_ida;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user