Commit 41f0200c authored by Nicolin Chen's avatar Nicolin Chen Committed by Joerg Roedel
Browse files

iommu/tegra241-cmdqv: Fix missing cpu_to_le64 at lvcmdq_err_map



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: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508142105.Jb5Smjsg-lkp@intel.com/


Suggested-by: default avatarPranjal Shrivastava <praan@google.com>
Signed-off-by: default avatarNicolin Chen <nicolinc@nvidia.com>
Link: https://lore.kernel.org/r/20250814193039.2265813-1-nicolinc@nvidia.com


Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent 8503d0fc
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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));