lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250807115752.1663383-4-eperezma@redhat.com>
Date: Thu,  7 Aug 2025 13:57:48 +0200
From: Eugenio Pérez <eperezma@...hat.com>
To: "Michael S . Tsirkin " <mst@...hat.com>
Cc: Cindy Lu <lulu@...hat.com>,
	Eugenio Pérez <eperezma@...hat.com>,
	Yongji Xie <xieyongji@...edance.com>,
	Stefano Garzarella <sgarzare@...hat.com>,
	virtualization@...ts.linux.dev,
	Laurent Vivier <lvivier@...hat.com>,
	linux-kernel@...r.kernel.org,
	Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
	jasowang@...hat.com,
	Maxime Coquelin <mcoqueli@...hat.com>
Subject: [RFC v2 3/7] vdpa: change get_vq_map_token type to void *(*cb)

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 <eperezma@...hat.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ