* [PATCH rc] iommu/tegra241-cmdqv: Fix missing cpu_to_le64 at lvcmdq_err_map
@ 2025-08-14 19:30 Nicolin Chen
2025-08-18 17:04 ` Jason Gunthorpe
0 siblings, 1 reply; 2+ messages in thread
From: Nicolin Chen @ 2025-08-14 19:30 UTC (permalink / raw)
To: will
Cc: robin.murphy, joro, jonathanh, thierry.reding, vdumpa, jgg,
linux-tegra, linux-arm-kernel, iommu, linux-kernel, praan
Sparse reported a warning:
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:305:47:
sparse: expected restricted __le64
sparse: got unsigned long long
Add cpu_to_le64() to fix that.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508142105.Jb5Smjsg-lkp@intel.com/
Suggested-by: Pranjal Shrivastava <praan@google.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
---
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c b/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c
index be1aaaf8cd17c..378104cd395e5 100644
--- a/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c
+++ b/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c
@@ -301,9 +301,11 @@ static void tegra241_vintf_user_handle_error(struct tegra241_vintf *vintf)
struct iommu_vevent_tegra241_cmdqv vevent_data;
int i;
- for (i = 0; i < LVCMDQ_ERR_MAP_NUM_64; i++)
- vevent_data.lvcmdq_err_map[i] =
- readq_relaxed(REG_VINTF(vintf, LVCMDQ_ERR_MAP_64(i)));
+ for (i = 0; i < LVCMDQ_ERR_MAP_NUM_64; i++) {
+ u64 err = readq_relaxed(REG_VINTF(vintf, LVCMDQ_ERR_MAP_64(i)));
+
+ vevent_data.lvcmdq_err_map[i] = cpu_to_le64(err);
+ }
iommufd_viommu_report_event(viommu, IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV,
&vevent_data, sizeof(vevent_data));
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH rc] iommu/tegra241-cmdqv: Fix missing cpu_to_le64 at lvcmdq_err_map
2025-08-14 19:30 [PATCH rc] iommu/tegra241-cmdqv: Fix missing cpu_to_le64 at lvcmdq_err_map Nicolin Chen
@ 2025-08-18 17:04 ` Jason Gunthorpe
0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2025-08-18 17:04 UTC (permalink / raw)
To: Nicolin Chen
Cc: will, robin.murphy, joro, jonathanh, thierry.reding, vdumpa,
linux-tegra, linux-arm-kernel, iommu, linux-kernel, praan
On Thu, Aug 14, 2025 at 12:30:38PM -0700, Nicolin Chen wrote:
> Sparse reported a warning:
> drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:305:47:
> sparse: expected restricted __le64
> sparse: got unsigned long long
>
> Add cpu_to_le64() to fix that.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202508142105.Jb5Smjsg-lkp@intel.com/
> Suggested-by: Pranjal Shrivastava <praan@google.com>
> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
> ---
> drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-18 17:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14 19:30 [PATCH rc] iommu/tegra241-cmdqv: Fix missing cpu_to_le64 at lvcmdq_err_map Nicolin Chen
2025-08-18 17:04 ` Jason Gunthorpe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.