platform/mellanox: mlxbf-tmfifo: fix vring_desc.len assignment
Subsystems (2)
PATCH 1/1 platform/mellanox: mlxbf-tmfifo: fix vring_desc.len assignment
Fix warnings reported by sparse, related to incorrect type:drivers/platform/mellanox/mlxbf-tmfifo.c:284:38: warning: incorrect type in assignment (different base types)drivers/platform/mellanox/mlxbf-tmfifo.c:284:38: expected restricted __virtio32 [usertype] lendrivers/platform/mellanox/mlxbf-tmfifo.c:284:38: got unsigned long
--- drivers/platform/mellanox/mlxbf-tmfifo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/platform/mellanox/mlxbf-tmfifo.c +2 -1
@@ -281,7 +281,8 @@ static int mlxbf_tmfifo_alloc_vrings(struct mlxbf_tmfifo *fifo, vring->align =SMP_CACHE_BYTES ; vring->index = i; vring->vdev_id = tm_vdev->vdev.id.device; - vring->drop_desc.len =VRING_DROP_DESC_MAX_LEN ; + vring->drop_desc.len =cpu_to_virtio32 (&tm_vdev->vdev, +VRING_DROP_DESC_MAX_LEN ); dev = &tm_vdev->vdev.dev; size =vring_size (vring->num, vring->align);
Signature · 1 line
2.43.2
Ilpo Järvinen
maintainerQuoted 6 lines · David Thompson
Fix warnings reported by sparse, related to incorrect type:
drivers/platform/mellanox/mlxbf-tmfifo.c:284:38: warning: incorrect type in assignment (different base types)drivers/platform/mellanox/mlxbf-tmfifo.c:284:38: expected restricted__virtio32[usertype] lendrivers/platform/mellanox/mlxbf-tmfifo.c:284:38: got unsigned long
Thank you for your contribution, it has been applied to my local review-ilpo-fixes branch. Note it will show up in the public platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my local branch there, which might take a while.
The list of commits applied:
[1/1] platform/mellanox: mlxbf-tmfifo: fix vring_desc.len assignment
commit: 109f4d29dade8ae5b4ac6325af9d1bc24b4230f8
--
i.