Mail list requested a better (safer) return type in the DMA rework
series so this is just temporal workaround to develop this RFC.

Signed-off-by: Eugenio Pérez <epere...@redhat.com>
---
 drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +-
 include/linux/vdpa.h              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c 
b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index 78421fc709c6..ef39841e6e96 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -3395,7 +3395,7 @@ static int mlx5_vdpa_reset_map(struct vdpa_device *vdev, 
unsigned int asid)
        return err;
 }
 
-static struct device *mlx5_get_vq_map_token(struct vdpa_device *vdev, u16 idx)
+static void *mlx5_get_vq_map_token(struct vdpa_device *vdev, u16 idx)
 {
        struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev);
 
diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
index cb51b7e2e569..3846791f6868 100644
--- a/include/linux/vdpa.h
+++ b/include/linux/vdpa.h
@@ -438,7 +438,7 @@ struct vdpa_config_ops {
        int (*reset_map)(struct vdpa_device *vdev, unsigned int asid);
        int (*set_group_asid)(struct vdpa_device *vdev, unsigned int group,
                              unsigned int asid);
-       struct device *(*get_vq_map_token)(struct vdpa_device *vdev, u16 idx);
+       void *(*get_vq_map_token)(struct vdpa_device *vdev, u16 idx);
        int (*bind_mm)(struct vdpa_device *vdev, struct mm_struct *mm);
        void (*unbind_mm)(struct vdpa_device *vdev);
 
-- 
2.50.1


Reply via email to