Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202404040339.S7CUIgf3-lkp@intel.com/
Fixes: 78034cbece79 ("platform/mellanox: mlxbf-tmfifo: Drop the Rx packet if no more descriptors")
Signed-off-by: David Thompson <davthompson@nvidia.com>
Link: https://lore.kernel.org/r/20250613214608.2250130-1-davthompson@nvidia.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

David Thompson and committed by
Ilpo Järvinen
109f4d29 c8892c2a

+2 -1
+2 -1
drivers/platform/mellanox/mlxbf-tmfifo.c
··· 281 281 vring->align = SMP_CACHE_BYTES; 282 282 vring->index = i; 283 283 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); 285 286 dev = &tm_vdev->vdev.dev; 286 287 287 288 size = vring_size(vring->num, vring->align);