* drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:305:47: sparse: sparse: incorrect type in assignment (different base types)
@ 2025-08-14 13:21 kernel test robot
2025-08-14 13:34 ` Pranjal Shrivastava
0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2025-08-14 13:21 UTC (permalink / raw)
To: Nicolin Chen
Cc: oe-kbuild-all, linux-kernel, Jason Gunthorpe, Alok Tiwari,
Pranjal Shrivastava
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0cc53520e68bea7fb80fdc6bdf8d226d1b6a98d9
commit: 32b2d3a57e26804ca96d82a222667ac0fa226cb7 iommu/tegra241-cmdqv: Add IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV support
date: 5 weeks ago
config: arm64-randconfig-r112-20250814 (https://download.01.org/0day-ci/archive/20250814/202508142105.Jb5Smjsg-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 3769ce013be2879bf0b329c14a16f5cb766f26ce)
reproduce: (https://download.01.org/0day-ci/archive/20250814/202508142105.Jb5Smjsg-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508142105.Jb5Smjsg-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:305:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le64 @@ got unsigned long long @@
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:305:47: sparse: expected restricted __le64
drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:305:47: sparse: got unsigned long long
vim +305 drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c
297
298 static void tegra241_vintf_user_handle_error(struct tegra241_vintf *vintf)
299 {
300 struct iommufd_viommu *viommu = &vintf->vsmmu.core;
301 struct iommu_vevent_tegra241_cmdqv vevent_data;
302 int i;
303
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)));
307
308 iommufd_viommu_report_event(viommu, IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV,
309 &vevent_data, sizeof(vevent_data));
310 }
311
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:305:47: sparse: sparse: incorrect type in assignment (different base types) 2025-08-14 13:21 drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:305:47: sparse: sparse: incorrect type in assignment (different base types) kernel test robot @ 2025-08-14 13:34 ` Pranjal Shrivastava 2025-08-14 13:52 ` Pranjal Shrivastava 0 siblings, 1 reply; 4+ messages in thread From: Pranjal Shrivastava @ 2025-08-14 13:34 UTC (permalink / raw) To: kernel test robot Cc: Nicolin Chen, oe-kbuild-all, linux-kernel, Jason Gunthorpe, Alok Tiwari On Thu, Aug 14, 2025 at 09:21:50PM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: 0cc53520e68bea7fb80fdc6bdf8d226d1b6a98d9 > commit: 32b2d3a57e26804ca96d82a222667ac0fa226cb7 iommu/tegra241-cmdqv: Add IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV support > date: 5 weeks ago > config: arm64-randconfig-r112-20250814 (https://download.01.org/0day-ci/archive/20250814/202508142105.Jb5Smjsg-lkp@intel.com/config) > compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 3769ce013be2879bf0b329c14a16f5cb766f26ce) > reproduce: (https://download.01.org/0day-ci/archive/20250814/202508142105.Jb5Smjsg-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot <lkp@intel.com> > | Closes: https://lore.kernel.org/oe-kbuild-all/202508142105.Jb5Smjsg-lkp@intel.com/ > > sparse warnings: (new ones prefixed by >>) > >> drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:305:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le64 @@ got unsigned long long @@ > drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:305:47: sparse: expected restricted __le64 > drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:305:47: sparse: got unsigned long long > > vim +305 drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c > > 297 > 298 static void tegra241_vintf_user_handle_error(struct tegra241_vintf *vintf) > 299 { > 300 struct iommufd_viommu *viommu = &vintf->vsmmu.core; > 301 struct iommu_vevent_tegra241_cmdqv vevent_data; > 302 int i; > 303 > 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))); > 307 > 308 iommufd_viommu_report_event(viommu, IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV, > 309 &vevent_data, sizeof(vevent_data)); > 310 } > 311 > I assume we'd need something like the following (untested) for this: --- a/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c +++ b/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c @@ -303,8 +303,8 @@ 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))); + cpu_to_le64(readq_relaxed(REG_VINTF(vintf, LVCMDQ_ERR_MAP_64(i)))); iommufd_viommu_report_event(viommu, IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV, &vevent_data, sizeof(vevent_data)); > -- > 0-DAY CI Kernel Test Service > https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:305:47: sparse: sparse: incorrect type in assignment (different base types) 2025-08-14 13:34 ` Pranjal Shrivastava @ 2025-08-14 13:52 ` Pranjal Shrivastava 2025-08-14 19:33 ` Nicolin Chen 0 siblings, 1 reply; 4+ messages in thread From: Pranjal Shrivastava @ 2025-08-14 13:52 UTC (permalink / raw) To: kernel test robot Cc: Nicolin Chen, oe-kbuild-all, linux-kernel, Jason Gunthorpe, Alok Tiwari On Thu, Aug 14, 2025 at 7:04 PM Pranjal Shrivastava <praan@google.com> wrote: > > On Thu, Aug 14, 2025 at 09:21:50PM +0800, kernel test robot wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > > head: 0cc53520e68bea7fb80fdc6bdf8d226d1b6a98d9 > > commit: 32b2d3a57e26804ca96d82a222667ac0fa226cb7 iommu/tegra241-cmdqv: Add IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV support > > date: 5 weeks ago > > config: arm64-randconfig-r112-20250814 (https://download.01.org/0day-ci/archive/20250814/202508142105.Jb5Smjsg-lkp@intel.com/config) > > compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 3769ce013be2879bf0b329c14a16f5cb766f26ce) > > reproduce: (https://download.01.org/0day-ci/archive/20250814/202508142105.Jb5Smjsg-lkp@intel.com/reproduce) > > > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > > the same patch/commit), kindly add following tags > > | Reported-by: kernel test robot <lkp@intel.com> > > | Closes: https://lore.kernel.org/oe-kbuild-all/202508142105.Jb5Smjsg-lkp@intel.com/ > > > > sparse warnings: (new ones prefixed by >>) > > >> drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:305:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le64 @@ got unsigned long long @@ > > drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:305:47: sparse: expected restricted __le64 > > drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:305:47: sparse: got unsigned long long > > > > vim +305 drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c > > > > 297 > > 298 static void tegra241_vintf_user_handle_error(struct tegra241_vintf *vintf) > > 299 { > > 300 struct iommufd_viommu *viommu = &vintf->vsmmu.core; > > 301 struct iommu_vevent_tegra241_cmdqv vevent_data; > > 302 int i; > > 303 > > 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))); > > 307 > > 308 iommufd_viommu_report_event(viommu, IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV, > > 309 &vevent_data, sizeof(vevent_data)); > > 310 } > > 311 > > > > I assume we'd need something like the following (untested) for this: > > --- a/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c > +++ b/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c > @@ -303,8 +303,8 @@ > > 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))); > + cpu_to_le64(readq_relaxed(REG_VINTF(vintf, LVCMDQ_ERR_MAP_64(i)))); > > iommufd_viommu_report_event(viommu, IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV, > &vevent_data, sizeof(vevent_data)); > Running `make C=2 drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.o` seems to remove the warning, I haven't tested this on HW, though. LMK, if this needs to be sent as a separate patch? > > -- > > 0-DAY CI Kernel Test Service > > https://github.com/intel/lkp-tests/wiki - Praan ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:305:47: sparse: sparse: incorrect type in assignment (different base types) 2025-08-14 13:52 ` Pranjal Shrivastava @ 2025-08-14 19:33 ` Nicolin Chen 0 siblings, 0 replies; 4+ messages in thread From: Nicolin Chen @ 2025-08-14 19:33 UTC (permalink / raw) To: Pranjal Shrivastava Cc: kernel test robot, oe-kbuild-all, linux-kernel, Jason Gunthorpe, Alok Tiwari On Thu, Aug 14, 2025 at 07:22:15PM +0530, Pranjal Shrivastava wrote: > On Thu, Aug 14, 2025 at 7:04 PM Pranjal Shrivastava <praan@google.com> wrote: > > I assume we'd need something like the following (untested) for this: > > > > --- a/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c > > +++ b/drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c > > @@ -303,8 +303,8 @@ > > > > 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))); > > + cpu_to_le64(readq_relaxed(REG_VINTF(vintf, LVCMDQ_ERR_MAP_64(i)))); > > > > iommufd_viommu_report_event(viommu, IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV, > > &vevent_data, sizeof(vevent_data)); > > > > Running `make C=2 drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.o` > seems to remove the warning, I haven't tested this on HW, though. > LMK, if this needs to be sent as a separate patch? I tested and sent a version with your Suggested-by. Thanks Nicolin ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-08-14 19:33 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-08-14 13:21 drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c:305:47: sparse: sparse: incorrect type in assignment (different base types) kernel test robot 2025-08-14 13:34 ` Pranjal Shrivastava 2025-08-14 13:52 ` Pranjal Shrivastava 2025-08-14 19:33 ` Nicolin Chen
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.