Skip to content

Commit 41f0200

Browse files
nicolincjoergroedel
authored andcommitted
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: 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> Link: https://lore.kernel.org/r/20250814193039.2265813-1-nicolinc@nvidia.com Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
1 parent 8503d0f commit 41f0200

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,11 @@ static void tegra241_vintf_user_handle_error(struct tegra241_vintf *vintf)
301301
struct iommu_vevent_tegra241_cmdqv vevent_data;
302302
int i;
303303

304-
for (i = 0; i < LVCMDQ_ERR_MAP_NUM_64; i++)
305-
vevent_data.lvcmdq_err_map[i] =
306-
readq_relaxed(REG_VINTF(vintf, LVCMDQ_ERR_MAP_64(i)));
304+
for (i = 0; i < LVCMDQ_ERR_MAP_NUM_64; i++) {
305+
u64 err = readq_relaxed(REG_VINTF(vintf, LVCMDQ_ERR_MAP_64(i)));
306+
307+
vevent_data.lvcmdq_err_map[i] = cpu_to_le64(err);
308+
}
307309

308310
iommufd_viommu_report_event(viommu, IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV,
309311
&vevent_data, sizeof(vevent_data));

0 commit comments

Comments
 (0)