Skip to content

Commit 109f4d2

Browse files
dthompsoij-intel
authored andcommitted
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] len drivers/platform/mellanox/mlxbf-tmfifo.c:284:38: got unsigned long Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Fixes: 78034cb ("platform/mellanox: mlxbf-tmfifo: Drop the Rx packet if no more descriptors") Signed-off-by: David Thompson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
1 parent c8892c2 commit 109f4d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/platform/mellanox/mlxbf-tmfifo.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ static int mlxbf_tmfifo_alloc_vrings(struct mlxbf_tmfifo *fifo,
281281
vring->align = SMP_CACHE_BYTES;
282282
vring->index = i;
283283
vring->vdev_id = tm_vdev->vdev.id.device;
284-
vring->drop_desc.len = VRING_DROP_DESC_MAX_LEN;
284+
vring->drop_desc.len = cpu_to_virtio32(&tm_vdev->vdev,
285+
VRING_DROP_DESC_MAX_LEN);
285286
dev = &tm_vdev->vdev.dev;
286287

287288
size = vring_size(vring->num, vring->align);

0 commit comments

Comments
 (0)