Skip to content

Commit c271fcd

Browse files
tititiou36mstsirkin
authored andcommitted
vdpa: Remove usage of the deprecated ida_simple_xx() API
ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Message-Id: <d7534cc4caf4ff9d6b072744352c1b69487779ea.1702230703.git.christophe.jaillet@wanadoo.fr> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com>
1 parent dff4fa0 commit c271fcd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/vdpa/vdpa.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static void vdpa_release_dev(struct device *d)
131131
if (ops->free)
132132
ops->free(vdev);
133133

134-
ida_simple_remove(&vdpa_index_ida, vdev->index);
134+
ida_free(&vdpa_index_ida, vdev->index);
135135
kfree(vdev->driver_override);
136136
kfree(vdev);
137137
}
@@ -205,7 +205,7 @@ struct vdpa_device *__vdpa_alloc_device(struct device *parent,
205205
return vdev;
206206

207207
err_name:
208-
ida_simple_remove(&vdpa_index_ida, vdev->index);
208+
ida_free(&vdpa_index_ida, vdev->index);
209209
err_ida:
210210
kfree(vdev);
211211
err:

0 commit comments

Comments
 (0)