linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] platform/mellanox: mlxbf-tmfifo: fix vring_desc.len assignment
@ 2025-06-13 21:46 David Thompson
  2025-06-17 12:39 ` Ilpo Järvinen
  0 siblings, 1 reply; 2+ messages in thread
From: David Thompson @ 2025-06-13 21:46 UTC (permalink / raw)
  To: hdegoede, ilpo.jarvinen, vadimp
  Cc: platform-driver-x86, linux-kernel, David Thompson,
	kernel test robot

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>
---
 drivers/platform/mellanox/mlxbf-tmfifo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c
index aae99adb29eb..70c58c4c6c84 100644
--- a/drivers/platform/mellanox/mlxbf-tmfifo.c
+++ b/drivers/platform/mellanox/mlxbf-tmfifo.c
@@ -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);
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] platform/mellanox: mlxbf-tmfifo: fix vring_desc.len assignment
  2025-06-13 21:46 [PATCH v1] platform/mellanox: mlxbf-tmfifo: fix vring_desc.len assignment David Thompson
@ 2025-06-17 12:39 ` Ilpo Järvinen
  0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2025-06-17 12:39 UTC (permalink / raw)
  To: vadimp, Hans de Goede, David Thompson
  Cc: platform-driver-x86, linux-kernel, kernel test robot

On Fri, 13 Jun 2025 21:46:08 +0000, David Thompson wrote:

> 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
> 
> 


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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-06-17 12:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-13 21:46 [PATCH v1] platform/mellanox: mlxbf-tmfifo: fix vring_desc.len assignment David Thompson
2025-06-17 12:39 ` Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).