include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in argument 1 (different address spaces)

From: kernel test robot

Date: Fri Oct 31 2025 - 23:22:08 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ba36dd5ee6fd4643ebbf6ee6eefcecf0b07e35c7
commit: 506aa8b02a8d6898c64cc095d233fbae1cef8b8a dma-fence: Add safe access helpers and document the rules
date: 5 months ago
config: sh-randconfig-r121-20251101 (https://download.01.org/0day-ci/archive/20251101/202511011126.rb1fMBjX-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 14.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251101/202511011126.rb1fMBjX-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/202511011126.rb1fMBjX-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
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 *
drivers/dma-buf/dma-fence.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, include/trace/events/dma_fence.h):
>> include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *str @@ got char const [noderef] __rcu * @@
include/trace/events/dma_fence.h:12:1: sparse: expected char const *str
include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu *
>> include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void const *driver_ptr_ @@ got char const [noderef] __rcu * @@
include/trace/events/dma_fence.h:12:1: sparse: expected void const *driver_ptr_
include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu *
>> include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *str @@ got char const [noderef] __rcu * @@
include/trace/events/dma_fence.h:12:1: sparse: expected char const *str
include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu *
>> include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void const *timeline_ptr_ @@ got char const [noderef] __rcu * @@
include/trace/events/dma_fence.h:12:1: sparse: expected void const *timeline_ptr_
include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu *
>> include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *str @@ got char const [noderef] __rcu * @@
include/trace/events/dma_fence.h:12:1: sparse: expected char const *str
include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu *
>> include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void const *driver_ptr_ @@ got char const [noderef] __rcu * @@
include/trace/events/dma_fence.h:12:1: sparse: expected void const *driver_ptr_
include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu *
>> include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected char const *str @@ got char const [noderef] __rcu * @@
include/trace/events/dma_fence.h:12:1: sparse: expected char const *str
include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu *
>> include/trace/events/dma_fence.h:12:1: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void const *timeline_ptr_ @@ got char const [noderef] __rcu * @@
include/trace/events/dma_fence.h:12:1: sparse: expected void const *timeline_ptr_
include/trace/events/dma_fence.h:12:1: sparse: got char const [noderef] __rcu *

vim +12 include/trace/events/dma_fence.h

e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 11
f54d1867005c332 include/trace/events/dma_fence.h Chris Wilson 2016-10-25 @12 DECLARE_EVENT_CLASS(dma_fence,
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 13
f54d1867005c332 include/trace/events/dma_fence.h Chris Wilson 2016-10-25 14 TP_PROTO(struct dma_fence *fence),
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 15
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 16 TP_ARGS(fence),
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 17
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 18 TP_STRUCT__entry(
ecec875a6c33790 include/trace/events/dma_fence.h Tvrtko Ursulin 2025-05-15 19 __string(driver, dma_fence_driver_name(fence))
ecec875a6c33790 include/trace/events/dma_fence.h Tvrtko Ursulin 2025-05-15 20 __string(timeline, dma_fence_timeline_name(fence))
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 21 __field(unsigned int, context)
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 22 __field(unsigned int, seqno)
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 23 ),
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 24
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 25 TP_fast_assign(
2c92ca849fcc6ee include/trace/events/dma_fence.h Steven Rostedt (Google 2024-05-16 26) __assign_str(driver);
2c92ca849fcc6ee include/trace/events/dma_fence.h Steven Rostedt (Google 2024-05-16 27) __assign_str(timeline);
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 28 __entry->context = fence->context;
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 29 __entry->seqno = fence->seqno;
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 30 ),
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 31
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 32 TP_printk("driver=%s timeline=%s context=%u seqno=%u",
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 33 __get_str(driver), __get_str(timeline), __entry->context,
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 34 __entry->seqno)
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 35 );
e941759c74a44d6 include/trace/events/fence.h Maarten Lankhorst 2014-07-01 36

:::::: The code at line 12 was first introduced by commit
:::::: f54d1867005c3323f5d8ad83eed823e84226c429 dma-buf: Rename struct fence to dma_fence

:::::: TO: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
:::::: CC: Daniel Vetter <daniel.vetter@xxxxxxxx>

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