Skip to content

Commit

Permalink
vdpa: Use simpler version of ida allocation
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Eli Cohen <[email protected]>
Acked-by: Jason Wang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michael S. Tsirkin <[email protected]>
  • Loading branch information
paravmellanox authored and mstsirkin committed Dec 18, 2020
1 parent 476c135 commit 418edde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/vdpa/vdpa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 418edde

Please sign in to comment.