drivers/dma-buf/dma-fence.c:1000:38: sparse: sparse: incorrect type in initializer (different address spaces)

From: kernel test robot

Date: Mon Feb 09 2026 - 19:21:33 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b
commit: ac364014fd812c8a2babe8f9dff8c909271a653e dma-buf: cleanup dma_fence_describe v3
date: 3 months ago
config: sparc64-randconfig-r113-20260209 (https://download.01.org/0day-ci/archive/20260210/202602100848.yaM8YnCT-lkp@xxxxxxxxx/config)
compiler: sparc64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260210/202602100848.yaM8YnCT-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602100848.yaM8YnCT-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/dma-buf/dma-fence.c:1000:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected char const [noderef] __rcu *timeline @@ got char * @@
drivers/dma-buf/dma-fence.c:1000:38: sparse: expected char const [noderef] __rcu *timeline
drivers/dma-buf/dma-fence.c:1000:38: sparse: got char *
>> drivers/dma-buf/dma-fence.c:1001:36: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected char const [noderef] __rcu *driver @@ got char * @@
drivers/dma-buf/dma-fence.c:1001:36: sparse: expected char const [noderef] __rcu *driver
drivers/dma-buf/dma-fence.c:1001:36: sparse: got char *
drivers/dma-buf/dma-fence.c:1112:51: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected char const [noderef] __rcu * @@ got char const * @@
drivers/dma-buf/dma-fence.c:1112:51: sparse: expected char const [noderef] __rcu *
drivers/dma-buf/dma-fence.c:1112:51: sparse: got char const *
drivers/dma-buf/dma-fence.c:1114:24: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected char const [noderef] __rcu * @@ got char * @@
drivers/dma-buf/dma-fence.c:1114:24: sparse: expected char const [noderef] __rcu *
drivers/dma-buf/dma-fence.c:1114:24: sparse: got char *
drivers/dma-buf/dma-fence.c:1144:51: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected char const [noderef] __rcu * @@ got char const * @@
drivers/dma-buf/dma-fence.c:1144:51: sparse: expected char const [noderef] __rcu *
drivers/dma-buf/dma-fence.c:1144:51: sparse: got char const *
drivers/dma-buf/dma-fence.c:1146:24: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected char const [noderef] __rcu * @@ got char * @@
drivers/dma-buf/dma-fence.c:1146:24: sparse: expected char const [noderef] __rcu *
drivers/dma-buf/dma-fence.c:1146:24: sparse: got char *

vim +1000 drivers/dma-buf/dma-fence.c

990
991 /**
992 * dma_fence_describe - Dump fence description into seq_file
993 * @fence: the fence to describe
994 * @seq: the seq_file to put the textual description into
995 *
996 * Dump a textual description of the fence and it's state into the seq_file.
997 */
998 void dma_fence_describe(struct dma_fence *fence, struct seq_file *seq)
999 {
> 1000 const char __rcu *timeline = "";
> 1001 const char __rcu *driver = "";
1002 const char *signaled = "";
1003
1004 rcu_read_lock();
1005
1006 if (!dma_fence_is_signaled(fence)) {
1007 timeline = dma_fence_timeline_name(fence);
1008 driver = dma_fence_driver_name(fence);
1009 signaled = "un";
1010 }
1011
1012 seq_printf(seq, "%llu:%llu %s %s %ssignalled\n",
1013 fence->context, fence->seqno, timeline, driver,
1014 signaled);
1015
1016 rcu_read_unlock();
1017 }
1018 EXPORT_SYMBOL(dma_fence_describe);
1019

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