[gvt-linux:gvt-stable-4.12 27/36] drivers/gpu/drm/i915/gvt/scheduler.c:270:7: warning: assignment makes pointer from integer without a cast

kbuild test robot fengguang.wu at intel.com
Sat Jul 22 20:35:22 UTC 2017


tree:   https://github.com/01org/gvt-linux.git gvt-stable-4.12
head:   322c8b39403d133cfd51a85c8720acb5c0174d4f
commit: 4a3c46abff595b52a44b3b870307489f44989f41 [27/36] drm/i915/gvt: Factor out scan and shadow from workload dispatch
config: x86_64-randconfig-a0-07230309 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 4a3c46abff595b52a44b3b870307489f44989f41
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/i915/gvt/scheduler.c: In function 'dispatch_workload':
>> drivers/gpu/drm/i915/gvt/scheduler.c:270:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     ring = engine->context_pin(engine, shadow_ctx);
          ^

vim +270 drivers/gpu/drm/i915/gvt/scheduler.c

   237	
   238	static int dispatch_workload(struct intel_vgpu_workload *workload)
   239	{
   240		int ring_id = workload->ring_id;
   241		struct i915_gem_context *shadow_ctx = workload->vgpu->shadow_ctx;
   242		struct drm_i915_private *dev_priv = workload->vgpu->gvt->dev_priv;
   243		struct intel_engine_cs *engine = dev_priv->engine[ring_id];
   244		struct intel_vgpu *vgpu = workload->vgpu;
   245		struct intel_ring *ring;
   246		int ret = 0;
   247	
   248		gvt_dbg_sched("ring id %d prepare to dispatch workload %p\n",
   249			ring_id, workload);
   250	
   251		mutex_lock(&dev_priv->drm.struct_mutex);
   252	
   253		ret = intel_gvt_scan_and_shadow_workload(workload);
   254		if (ret)
   255			goto out;
   256	
   257		if (workload->prepare) {
   258			ret = workload->prepare(workload);
   259			if (ret)
   260				goto out;
   261		}
   262	
   263		/* pin shadow context by gvt even the shadow context will be pinned
   264		 * when i915 alloc request. That is because gvt will update the guest
   265		 * context from shadow context when workload is completed, and at that
   266		 * moment, i915 may already unpined the shadow context to make the
   267		 * shadow_ctx pages invalid. So gvt need to pin itself. After update
   268		 * the guest context, gvt can unpin the shadow_ctx safely.
   269		 */
 > 270		ring = engine->context_pin(engine, shadow_ctx);
   271		if (IS_ERR(ring)) {
   272			ret = PTR_ERR(ring);
   273			gvt_vgpu_err("fail to pin shadow context\n");
   274			goto out;
   275		}
   276	
   277	out:
   278		if (ret)
   279			workload->status = ret;
   280	
   281		if (!IS_ERR_OR_NULL(workload->req)) {
   282			gvt_dbg_sched("ring id %d submit workload to i915 %p\n",
   283					ring_id, workload->req);
   284			i915_add_request(workload->req);
   285			workload->dispatched = true;
   286		}
   287	
   288		mutex_unlock(&dev_priv->drm.struct_mutex);
   289		return ret;
   290	}
   291	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 29509 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20170723/50928bbc/attachment-0001.gz>


More information about the intel-gvt-dev mailing list