summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorParav Pandit <parav@nvidia.com>2020-11-12 08:40:00 +0200
committerMichael S. Tsirkin <mst@redhat.com>2020-12-18 16:14:31 -0500
commit418eddef050d5f6393c303a94e3173847ab85466 (patch)
tree41a5d895bfda600fa2f8e63ece40eb6aaf604d49
parent476c135e321716ad7a8a5d4a19a636e2dcc50526 (diff)
downloadlinux-418eddef050d5f6393c303a94e3173847ab85466.tar.bz2
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>
-rw-r--r--drivers/vdpa/vdpa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c
index a69ffc991e13..c0825650c055 100644
--- a/drivers/vdpa/vdpa.c
+++ b/drivers/vdpa/vdpa.c
@@ -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;