intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [Intel-gfx] [drm-intel:drm-intel-gt-next 29/30] drivers/gpu/drm/i915/gem/selftests/mock_context.c:43:25: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2021-07-15 16:30 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-07-15 16:30 UTC (permalink / raw)
  To: Jason Ekstrand; +Cc: Daniel Vetter, intel-gfx, kbuild-all, dri-devel

[-- Attachment #1: Type: text/plain, Size: 3981 bytes --]

tree:   git://anongit.freedesktop.org/drm-intel drm-intel-gt-next
head:   ca06f93638362bf83584cdf33897822bf1578cf9
commit: 0eee9977f9d3d8f1e40175dada55b3d00121ac79 [29/30] drm/i915/gem: Roll all of context creation together
config: x86_64-randconfig-s022-20210715 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        git remote add drm-intel git://anongit.freedesktop.org/drm-intel
        git fetch --no-tags drm-intel drm-intel-gt-next
        git checkout 0eee9977f9d3d8f1e40175dada55b3d00121ac79
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
   drivers/gpu/drm/i915/gem/i915_gem_context.c:1412:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct i915_address_space *vm @@     got struct i915_address_space [noderef] __rcu *vm @@
   drivers/gpu/drm/i915/gem/i915_gem_context.c:1412:34: sparse:     expected struct i915_address_space *vm
   drivers/gpu/drm/i915/gem/i915_gem_context.c:1412:34: sparse:     got struct i915_address_space [noderef] __rcu *vm
   drivers/gpu/drm/i915/gem/i915_gem_context.c: note: in included file:
>> drivers/gpu/drm/i915/gem/selftests/mock_context.c:43:25: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct i915_address_space [noderef] __rcu *vm @@     got struct i915_address_space * @@
   drivers/gpu/drm/i915/gem/selftests/mock_context.c:43:25: sparse:     expected struct i915_address_space [noderef] __rcu *vm
   drivers/gpu/drm/i915/gem/selftests/mock_context.c:43:25: sparse:     got struct i915_address_space *
>> drivers/gpu/drm/i915/gem/selftests/mock_context.c:60:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct i915_address_space *vm @@     got struct i915_address_space [noderef] __rcu *vm @@
   drivers/gpu/drm/i915/gem/selftests/mock_context.c:60:34: sparse:     expected struct i915_address_space *vm
   drivers/gpu/drm/i915/gem/selftests/mock_context.c:60:34: sparse:     got struct i915_address_space [noderef] __rcu *vm

vim +43 drivers/gpu/drm/i915/gem/selftests/mock_context.c

    10	
    11	struct i915_gem_context *
    12	mock_context(struct drm_i915_private *i915,
    13		     const char *name)
    14	{
    15		struct i915_gem_context *ctx;
    16		struct i915_gem_engines *e;
    17		struct intel_sseu null_sseu = {};
    18	
    19		ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
    20		if (!ctx)
    21			return NULL;
    22	
    23		kref_init(&ctx->ref);
    24		INIT_LIST_HEAD(&ctx->link);
    25		ctx->i915 = i915;
    26	
    27		mutex_init(&ctx->mutex);
    28	
    29		spin_lock_init(&ctx->stale.lock);
    30		INIT_LIST_HEAD(&ctx->stale.engines);
    31	
    32		i915_gem_context_set_persistence(ctx);
    33	
    34		if (name) {
    35			struct i915_ppgtt *ppgtt;
    36	
    37			strncpy(ctx->name, name, sizeof(ctx->name) - 1);
    38	
    39			ppgtt = mock_ppgtt(i915, name);
    40			if (!ppgtt)
    41				goto err_free;
    42	
  > 43			ctx->vm = i915_vm_open(&ppgtt->vm);
    44			i915_vm_put(&ppgtt->vm);
    45		}
    46	
    47		mutex_init(&ctx->engines_mutex);
    48		e = default_engines(ctx, null_sseu);
    49		if (IS_ERR(e))
    50			goto err_vm;
    51		RCU_INIT_POINTER(ctx->engines, e);
    52	
    53		INIT_RADIX_TREE(&ctx->handles_vma, GFP_KERNEL);
    54		mutex_init(&ctx->lut_mutex);
    55	
    56		return ctx;
    57	
    58	err_vm:
    59		if (ctx->vm)
  > 60			i915_vm_close(ctx->vm);
    61	err_free:
    62		kfree(ctx);
    63		return NULL;
    64	}
    65	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 51109 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-15 16:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 16:30 [Intel-gfx] [drm-intel:drm-intel-gt-next 29/30] drivers/gpu/drm/i915/gem/selftests/mock_context.c:43:25: sparse: sparse: incorrect type in assignment (different address spaces) 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;
as well as URLs for NNTP newsgroup(s).