[drm-intel:drm-intel-gt-next 6/6] drivers/gpu/drm/i915/i915_drm_client.c:92:9: sparse: sparse: incompatible types in comparison expression (different address spaces):

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://anongit.freedesktop.org/drm-intel drm-intel-gt-next
head:   968853033d8aa4dbb80fbafa6f5d9b6a0ea21272
commit: 968853033d8aa4dbb80fbafa6f5d9b6a0ea21272 [6/6] drm/i915: Implement fdinfo memory stats printing
config: x86_64-randconfig-122-20231111 (https://download.01.org/0day-ci/archive/20231111/202311110610.h0m6ydI5-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231111/202311110610.h0m6ydI5-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/202311110610.h0m6ydI5-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/i915/i915_drm_client.c:92:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> drivers/gpu/drm/i915/i915_drm_client.c:92:9: sparse:    struct list_head [noderef] __rcu *
>> drivers/gpu/drm/i915/i915_drm_client.c:92:9: sparse:    struct list_head *
>> drivers/gpu/drm/i915/i915_drm_client.c:92:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> drivers/gpu/drm/i915/i915_drm_client.c:92:9: sparse:    struct list_head [noderef] __rcu *
>> drivers/gpu/drm/i915/i915_drm_client.c:92:9: sparse:    struct list_head *

vim +92 drivers/gpu/drm/i915/i915_drm_client.c

    72	
    73	static void show_meminfo(struct drm_printer *p, struct drm_file *file)
    74	{
    75		struct drm_memory_stats stats[INTEL_REGION_UNKNOWN] = {};
    76		struct drm_i915_file_private *fpriv = file->driver_priv;
    77		struct i915_drm_client *client = fpriv->client;
    78		struct drm_i915_private *i915 = fpriv->i915;
    79		struct drm_i915_gem_object *obj;
    80		struct intel_memory_region *mr;
    81		struct list_head *pos;
    82		unsigned int id;
    83	
    84		/* Public objects. */
    85		spin_lock(&file->table_lock);
    86		idr_for_each_entry(&file->object_idr, obj, id)
    87			obj_meminfo(obj, stats);
    88		spin_unlock(&file->table_lock);
    89	
    90		/* Internal objects. */
    91		rcu_read_lock();
  > 92		list_for_each_rcu(pos, &client->objects_list) {
    93			obj = i915_gem_object_get_rcu(list_entry(pos, typeof(*obj),
    94								 client_link));
    95			if (!obj)
    96				continue;
    97			obj_meminfo(obj, stats);
    98			i915_gem_object_put(obj);
    99		}
   100		rcu_read_unlock();
   101	
   102		for_each_memory_region(mr, i915, id)
   103			drm_print_memory_stats(p,
   104					       &stats[id],
   105					       DRM_GEM_OBJECT_RESIDENT |
   106					       DRM_GEM_OBJECT_PURGEABLE,
   107					       mr->uabi_name);
   108	}
   109	

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



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux