The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* drivers/gpu/drm/ttm/ttm_bo_util.c:465:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2026-06-14 14:06 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-06-14 14:06 UTC (permalink / raw)
  To: Julian Braha; +Cc: oe-kbuild-all, linux-kernel, Christian König 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e21ee273e6fa3879aec9a27251cfce98156e07c4
commit: df75430515c33ece3de46562f917acd9792505ad drm: fix dead default for DRM_TTM_KUNIT_TEST
date:   3 months ago
config: nios2-randconfig-r131-20260614 (https://download.01.org/0day-ci/archive/20260614/202606142104.yLTxoIoB-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 9.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260614/202606142104.yLTxoIoB-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
| Fixes: df75430515c3 ("drm: fix dead default for DRM_TTM_KUNIT_TEST")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606142104.yLTxoIoB-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/gpu/drm/ttm/ttm_bo_util.c:329:38: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void *virtual @@     got void [noderef] __iomem * @@
   drivers/gpu/drm/ttm/ttm_bo_util.c:329:38: sparse:     expected void *virtual
   drivers/gpu/drm/ttm/ttm_bo_util.c:329:38: sparse:     got void [noderef] __iomem *
   drivers/gpu/drm/ttm/ttm_bo_util.c:335:38: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void *virtual @@     got void [noderef] __iomem * @@
   drivers/gpu/drm/ttm/ttm_bo_util.c:335:38: sparse:     expected void *virtual
   drivers/gpu/drm/ttm/ttm_bo_util.c:335:38: sparse:     got void [noderef] __iomem *
>> drivers/gpu/drm/ttm/ttm_bo_util.c:465:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __iomem *addr @@     got void *virtual @@
   drivers/gpu/drm/ttm/ttm_bo_util.c:465:28: sparse:     expected void [noderef] __iomem *addr
   drivers/gpu/drm/ttm/ttm_bo_util.c:465:28: sparse:     got void *virtual

vim +465 drivers/gpu/drm/ttm/ttm_bo_util.c

ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  451  
a3185f91d0579b6 Christian König  2022-05-09  452  /**
a3185f91d0579b6 Christian König  2022-05-09  453   * ttm_bo_kunmap
a3185f91d0579b6 Christian König  2022-05-09  454   *
a3185f91d0579b6 Christian König  2022-05-09  455   * @map: Object describing the map to unmap.
a3185f91d0579b6 Christian König  2022-05-09  456   *
a3185f91d0579b6 Christian König  2022-05-09  457   * Unmaps a kernel map set up by ttm_bo_kmap.
a3185f91d0579b6 Christian König  2022-05-09  458   */
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  459  void ttm_bo_kunmap(struct ttm_bo_kmap_obj *map)
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  460  {
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  461  	if (!map->virtual)
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  462  		return;
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  463  	switch (map->bo_kmap_type) {
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  464  	case ttm_bo_map_iomap:
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10 @465  		iounmap(map->virtual);
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  466  		break;
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  467  	case ttm_bo_map_vmap:
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  468  		vunmap(map->virtual);
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  469  		break;
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  470  	case ttm_bo_map_kmap:
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  471  		kunmap(map->page);
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  472  		break;
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  473  	case ttm_bo_map_premapped:
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  474  		break;
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  475  	default:
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  476  		BUG();
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  477  	}
d3116756a710e3c Christian König  2021-04-12  478  	ttm_mem_io_free(map->bo->bdev, map->bo->resource);
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  479  	map->virtual = NULL;
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  480  	map->page = NULL;
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  481  }
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  482  EXPORT_SYMBOL(ttm_bo_kunmap);
ba4e7d973dd09b6 Thomas Hellstrom 2009-06-10  483  

:::::: The code at line 465 was first introduced by commit
:::::: ba4e7d973dd09b66912ac4c0856add8b0703a997 drm: Add the TTM GPU memory manager subsystem.

:::::: TO: Thomas Hellstrom <thellstrom@vmware.com>
:::::: CC: Dave Airlie <airlied@redhat.com>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

* drivers/gpu/drm/ttm/ttm_bo_util.c:465:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2026-07-18  7:36 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-07-18  7:36 UTC (permalink / raw)
  To: Julian Braha; +Cc: oe-kbuild-all, linux-kernel, Christian König 

Hi Julian,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   94515f3a7d4256a5062176b7d6ed0471938cd51a
commit: df75430515c33ece3de46562f917acd9792505ad drm: fix dead default for DRM_TTM_KUNIT_TEST
date:   4 months ago
config: mips-randconfig-r122-20260718 (https://download.01.org/0day-ci/archive/20260718/202607181523.7dnGxeIP-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260718/202607181523.7dnGxeIP-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
| Fixes: df75430515c3 ("drm: fix dead default for DRM_TTM_KUNIT_TEST")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607181523.7dnGxeIP-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/gpu/drm/ttm/ttm_bo_util.c:329:38: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void *virtual @@     got void [noderef] __iomem * @@
   drivers/gpu/drm/ttm/ttm_bo_util.c:329:38: sparse:     expected void *virtual
   drivers/gpu/drm/ttm/ttm_bo_util.c:329:38: sparse:     got void [noderef] __iomem *
   drivers/gpu/drm/ttm/ttm_bo_util.c:335:38: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void *virtual @@     got void [noderef] __iomem * @@
   drivers/gpu/drm/ttm/ttm_bo_util.c:335:38: sparse:     expected void *virtual
   drivers/gpu/drm/ttm/ttm_bo_util.c:335:38: sparse:     got void [noderef] __iomem *
>> drivers/gpu/drm/ttm/ttm_bo_util.c:465:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got void *virtual @@
   drivers/gpu/drm/ttm/ttm_bo_util.c:465:28: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/gpu/drm/ttm/ttm_bo_util.c:465:28: sparse:     got void *virtual

vim +465 drivers/gpu/drm/ttm/ttm_bo_util.c

ba4e7d973dd09b Thomas Hellstrom 2009-06-10  451  
a3185f91d0579b Christian König  2022-05-09  452  /**
a3185f91d0579b Christian König  2022-05-09  453   * ttm_bo_kunmap
a3185f91d0579b Christian König  2022-05-09  454   *
a3185f91d0579b Christian König  2022-05-09  455   * @map: Object describing the map to unmap.
a3185f91d0579b Christian König  2022-05-09  456   *
a3185f91d0579b Christian König  2022-05-09  457   * Unmaps a kernel map set up by ttm_bo_kmap.
a3185f91d0579b Christian König  2022-05-09  458   */
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  459  void ttm_bo_kunmap(struct ttm_bo_kmap_obj *map)
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  460  {
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  461  	if (!map->virtual)
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  462  		return;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  463  	switch (map->bo_kmap_type) {
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  464  	case ttm_bo_map_iomap:
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 @465  		iounmap(map->virtual);
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  466  		break;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  467  	case ttm_bo_map_vmap:
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  468  		vunmap(map->virtual);
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  469  		break;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  470  	case ttm_bo_map_kmap:
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  471  		kunmap(map->page);
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  472  		break;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  473  	case ttm_bo_map_premapped:
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  474  		break;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  475  	default:
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  476  		BUG();
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  477  	}
d3116756a710e3 Christian König  2021-04-12  478  	ttm_mem_io_free(map->bo->bdev, map->bo->resource);
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  479  	map->virtual = NULL;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  480  	map->page = NULL;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  481  }
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  482  EXPORT_SYMBOL(ttm_bo_kunmap);
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  483  

:::::: The code at line 465 was first introduced by commit
:::::: ba4e7d973dd09b66912ac4c0856add8b0703a997 drm: Add the TTM GPU memory manager subsystem.

:::::: TO: Thomas Hellstrom <thellstrom@vmware.com>
:::::: CC: Dave Airlie <airlied@redhat.com>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-18  7:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-18  7:36 drivers/gpu/drm/ttm/ttm_bo_util.c:465:28: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2026-06-14 14:06 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox