Hi LiMing, kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master] [also build test WARNING on arm-perf/for-next/perf v7.2-rc7 next-20260814] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/LiMing-Wu/iommu-virtio-Add-debugfs-state-dump/20260815-175817 base: linus/master patch link: https://lore.kernel.org/r/20260731014838.31187-1-liming.wu%40jaguarmicro.com patch subject: [PATCH] iommu/virtio: Add debugfs state dump config: i386-randconfig-141-20260817 (https://download.01.org/0day-ci/archive/20260817/[email protected]/config) compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211) smatch: v0.5.0-9187-g5189e3fb reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260817/[email protected]/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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All warnings (new ones prefixed by >>): >> drivers/iommu/virtio-iommu.c:165:6: warning: format specifies type 'unsigned >> long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') >> [-Wformat] 164 | seq_printf(s, "input_range: %#llx-%#llx\n", | ~~~~~ | %#x 165 | viommu->geometry.aperture_start, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iommu/virtio-iommu.c:166:6: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat] 164 | seq_printf(s, "input_range: %#llx-%#llx\n", | ~~~~~ | %#x 165 | viommu->geometry.aperture_start, 166 | viommu->geometry.aperture_end); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/iommu/virtio-iommu.c:242:62: warning: implicit conversion from >> 'unsigned long long' to 'unsigned long' changes value from >> 18446744073709551615 to 4294967295 [-Wconstant-conversion] 242 | for (node = interval_tree_iter_first(&vdomain->mappings, 0, ULLONG_MAX); | ~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~ include/vdso/limits.h:16:21: note: expanded from macro 'ULLONG_MAX' 16 | #define ULLONG_MAX (~0ULL) | ^~~~~ drivers/iommu/virtio-iommu.c:243:53: warning: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion] 243 | node; node = interval_tree_iter_next(node, 0, ULLONG_MAX)) | ~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~ include/vdso/limits.h:16:21: note: expanded from macro 'ULLONG_MAX' 16 | #define ULLONG_MAX (~0ULL) | ^~~~~ drivers/iommu/virtio-iommu.c:263:6: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat] 260 | "id=%u type=%s endpoints=%lu mappings=%lu aperture=%#llx-%#llx pgsize_bitmap=%#lx map_flags=%#x\n", | ~~~~~ | %#x 261 | vdomain->id, viommu_domain_type_name(vdomain->domain.type), 262 | vdomain->nr_endpoints, mappings, 263 | vdomain->domain.geometry.aperture_start, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iommu/virtio-iommu.c:264:6: warning: format specifies type 'unsigned long long' but the argument has type 'dma_addr_t' (aka 'unsigned int') [-Wformat] 260 | "id=%u type=%s endpoints=%lu mappings=%lu aperture=%#llx-%#llx pgsize_bitmap=%#lx map_flags=%#x\n", | ~~~~~ | %#x 261 | vdomain->id, viommu_domain_type_name(vdomain->domain.type), 262 | vdomain->nr_endpoints, mappings, 263 | vdomain->domain.geometry.aperture_start, 264 | vdomain->domain.geometry.aperture_end, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/iommu/virtio-iommu.c:296:62: warning: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion] 296 | for (node = interval_tree_iter_first(&vdomain->mappings, 0, ULLONG_MAX); | ~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~ include/vdso/limits.h:16:21: note: expanded from macro 'ULLONG_MAX' 16 | #define ULLONG_MAX (~0ULL) | ^~~~~ drivers/iommu/virtio-iommu.c:297:53: warning: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion] 297 | node; node = interval_tree_iter_next(node, 0, ULLONG_MAX)) { | ~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~ include/vdso/limits.h:16:21: note: expanded from macro 'ULLONG_MAX' 16 | #define ULLONG_MAX (~0ULL) | ^~~~~ 8 warnings generated. vim +165 drivers/iommu/virtio-iommu.c 158 159 static int viommu_debugfs_status_show(struct seq_file *s, void *unused) 160 { 161 struct viommu_dev *viommu = s->private; 162 163 seq_printf(s, "device: %s\n", virtio_bus_name(viommu->vdev)); 164 seq_printf(s, "input_range: %#llx-%#llx\n", > 165 viommu->geometry.aperture_start, 166 viommu->geometry.aperture_end); 167 seq_printf(s, "page_size_mask: %#llx\n", viommu->pgsize_bitmap); 168 seq_printf(s, "domain_range: %u-%u\n", viommu->first_domain, 169 viommu->last_domain); 170 seq_printf(s, "identity_domain_id: %u\n", 171 viommu->identity_domain_id); 172 seq_printf(s, "probe_size: %u\n", viommu->probe_size); 173 seq_printf(s, "map_flags: %#x\n", viommu->map_flags); 174 seq_puts(s, "features:\n"); 175 viommu_debugfs_feature(s, viommu, VIRTIO_IOMMU_F_MAP_UNMAP, 176 "map_unmap"); 177 viommu_debugfs_feature(s, viommu, VIRTIO_IOMMU_F_INPUT_RANGE, 178 "input_range"); 179 viommu_debugfs_feature(s, viommu, VIRTIO_IOMMU_F_DOMAIN_RANGE, 180 "domain_range"); 181 viommu_debugfs_feature(s, viommu, VIRTIO_IOMMU_F_PROBE, "probe"); 182 viommu_debugfs_feature(s, viommu, VIRTIO_IOMMU_F_MMIO, "mmio"); 183 viommu_debugfs_feature(s, viommu, VIRTIO_IOMMU_F_BYPASS_CONFIG, 184 "bypass_config"); 185 186 return 0; 187 } 188 DEFINE_SHOW_ATTRIBUTE(viommu_debugfs_status); 189 190 static void viommu_debugfs_print_endpoint(struct seq_file *s, 191 struct viommu_endpoint *vdev) 192 { 193 int i; 194 u32 domain_id = 0; 195 const char *domain_type = "none"; 196 struct iommu_group *group; 197 struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(vdev->dev); 198 199 if (vdev->vdomain) { 200 domain_type = viommu_domain_type_name(vdev->vdomain->domain.type); 201 if (vdev->vdomain == &viommu_identity_domain) 202 domain_id = vdev->viommu->identity_domain_id; 203 else 204 domain_id = vdev->vdomain->id; 205 } 206 207 group = iommu_group_get(vdev->dev); 208 seq_printf(s, "endpoint=%s group_id=%d domain_type=%s", 209 dev_name(vdev->dev), group ? iommu_group_id(group) : -1, 210 domain_type); 211 if (vdev->vdomain) 212 seq_printf(s, " domain_id=%u", domain_id); 213 if (fwspec) { 214 seq_puts(s, " ids="); 215 for (i = 0; i < fwspec->num_ids; i++) 216 seq_printf(s, "%s%u", i ? "," : "", fwspec->ids[i]); 217 } 218 seq_putc(s, '\n'); 219 220 iommu_group_put(group); 221 } 222 223 static int viommu_debugfs_endpoints_show(struct seq_file *s, void *unused) 224 { 225 struct viommu_dev *viommu = s->private; 226 struct viommu_endpoint *vdev; 227 228 mutex_lock(&viommu->debugfs_lock); 229 list_for_each_entry(vdev, &viommu->debugfs_endpoints, debugfs_node) 230 viommu_debugfs_print_endpoint(s, vdev); 231 mutex_unlock(&viommu->debugfs_lock); 232 233 return 0; 234 } 235 DEFINE_SHOW_ATTRIBUTE(viommu_debugfs_endpoints); 236 237 static unsigned long viommu_debugfs_count_mappings(struct viommu_domain *vdomain) 238 { 239 unsigned long count = 0; 240 struct interval_tree_node *node; 241 > 242 for (node = interval_tree_iter_first(&vdomain->mappings, 0, > ULLONG_MAX); 243 node; node = interval_tree_iter_next(node, 0, ULLONG_MAX)) 244 count++; 245 246 return count; 247 } 248 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
