Skip to contentSkip to conversation

drivers/gpu/drm/msm/msm_gem.c:51:43: sparse: sparse: incorrect type in argument 1 (different address spaces)

PATCH kernel test robot 1 participant 1 message Jun 27, 2024 Memory management

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   df9574a57d02b265322e77fb8628d4d33641dda9
commit: 204226de27c3a6328b155005f132afe12eca3a5e [6881/8719] drm/msm: Add GPU memory traces
config: powerpc64-randconfig-r132-20240627 (https://download.01.org/0day-ci/archive/20240628/[email protected]/config)
compiler: powerpc64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240628/[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]/

sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/msm/msm_gem.c:51:43: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct pid *pid @@     got struct pid [noderef] __rcu *pid @@

drivers/gpu/drm/msm/msm_gem.c:51:43: sparse: expected struct pid *pid
drivers/gpu/drm/msm/msm_gem.c:51:43: sparse: got struct pid [noderef] __rcu *pid
drivers/gpu/drm/msm/msm_gem.c: note: in included file (through include/linux/smp.h, include/linux/lockdep.h, include/linux/spinlock.h, ...):
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true

vim +51 drivers/gpu/drm/msm/msm_gem.c

    44	
    45	static void update_ctx_mem(struct drm_file *file, ssize_t size)
    46	{
    47		struct msm_file_private *ctx = file->driver_priv;
    48		uint64_t ctx_mem = atomic64_add_return(size, &ctx->ctx_mem);
    49	
    50		rcu_read_lock(); /* Locks file->pid! */
  > 51		trace_gpu_mem_total(0, pid_nr(file->pid), ctx_mem);
    52		rcu_read_unlock();
    53	
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki