[gvt-linux:gvt-next 19/26] drivers/gpu/drm/i915/gvt/scheduler.c:317:26: error: unused variable 'engine'
kbuild test robot
fengguang.wu at intel.com
Wed Aug 23 04:26:25 UTC 2017
tree: https://github.com/01org/gvt-linux.git gvt-next
head: 95cab1d8ede0429340e049fa8c445878404f3cfe
commit: 021a43f0b7a53fa334daba6d47f4d49ea04b4b1b [19/26] drm/i915/gvt: Separate cmd scan from request allocation
config: x86_64-randconfig-x004-201734 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
git checkout 021a43f0b7a53fa334daba6d47f4d49ea04b4b1b
# save the attached .config to linux build tree
make ARCH=x86_64
Note: the gvt-linux/gvt-next HEAD 95cab1d8ede0429340e049fa8c445878404f3cfe builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
drivers/gpu/drm/i915/gvt/scheduler.c: In function 'dispatch_workload':
>> drivers/gpu/drm/i915/gvt/scheduler.c:317:26: error: unused variable 'engine' [-Werror=unused-variable]
struct intel_engine_cs *engine = dev_priv->engine[ring_id];
^~~~~~
>> drivers/gpu/drm/i915/gvt/scheduler.c:315:27: error: unused variable 'shadow_ctx' [-Werror=unused-variable]
struct i915_gem_context *shadow_ctx = workload->vgpu->shadow_ctx;
^~~~~~~~~~
cc1: all warnings being treated as errors
vim +/engine +317 drivers/gpu/drm/i915/gvt/scheduler.c
89ea20b9 Ping Gao 2017-06-29 311
89ea20b9 Ping Gao 2017-06-29 312 static int dispatch_workload(struct intel_vgpu_workload *workload)
89ea20b9 Ping Gao 2017-06-29 313 {
89ea20b9 Ping Gao 2017-06-29 314 int ring_id = workload->ring_id;
89ea20b9 Ping Gao 2017-06-29 @315 struct i915_gem_context *shadow_ctx = workload->vgpu->shadow_ctx;
89ea20b9 Ping Gao 2017-06-29 316 struct drm_i915_private *dev_priv = workload->vgpu->gvt->dev_priv;
89ea20b9 Ping Gao 2017-06-29 @317 struct intel_engine_cs *engine = dev_priv->engine[ring_id];
89ea20b9 Ping Gao 2017-06-29 318 int ret = 0;
89ea20b9 Ping Gao 2017-06-29 319
89ea20b9 Ping Gao 2017-06-29 320 gvt_dbg_sched("ring id %d prepare to dispatch workload %p\n",
89ea20b9 Ping Gao 2017-06-29 321 ring_id, workload);
89ea20b9 Ping Gao 2017-06-29 322
89ea20b9 Ping Gao 2017-06-29 323 mutex_lock(&dev_priv->drm.struct_mutex);
89ea20b9 Ping Gao 2017-06-29 324
89ea20b9 Ping Gao 2017-06-29 325 ret = intel_gvt_scan_and_shadow_workload(workload);
e4734057 Zhi Wang 2016-05-01 326 if (ret)
90d27a1b Pei Zhang 2016-11-14 327 goto out;
e4734057 Zhi Wang 2016-05-01 328
e4734057 Zhi Wang 2016-05-01 329 if (workload->prepare) {
e4734057 Zhi Wang 2016-05-01 330 ret = workload->prepare(workload);
e4734057 Zhi Wang 2016-05-01 331 if (ret)
90d27a1b Pei Zhang 2016-11-14 332 goto out;
e4734057 Zhi Wang 2016-05-01 333 }
e4734057 Zhi Wang 2016-05-01 334
90d27a1b Pei Zhang 2016-11-14 335 out:
90d27a1b Pei Zhang 2016-11-14 336 if (ret)
e4734057 Zhi Wang 2016-05-01 337 workload->status = ret;
e4734057 Zhi Wang 2016-05-01 338
89ea20b9 Ping Gao 2017-06-29 339 if (!IS_ERR_OR_NULL(workload->req)) {
89ea20b9 Ping Gao 2017-06-29 340 gvt_dbg_sched("ring id %d submit workload to i915 %p\n",
89ea20b9 Ping Gao 2017-06-29 341 ring_id, workload->req);
89ea20b9 Ping Gao 2017-06-29 342 i915_add_request(workload->req);
89ea20b9 Ping Gao 2017-06-29 343 workload->dispatched = true;
89ea20b9 Ping Gao 2017-06-29 344 }
3cd23b82 Chuanxiao Dong 2017-03-16 345
90d27a1b Pei Zhang 2016-11-14 346 mutex_unlock(&dev_priv->drm.struct_mutex);
e4734057 Zhi Wang 2016-05-01 347 return ret;
e4734057 Zhi Wang 2016-05-01 348 }
e4734057 Zhi Wang 2016-05-01 349
:::::: The code at line 317 was first introduced by commit
:::::: 89ea20b930cb7372095645acae8928a75f7d5be5 drm/i915/gvt: Factor out scan and shadow from workload dispatch
:::::: TO: Ping Gao <ping.a.gao at intel.com>
:::::: CC: Zhenyu Wang <zhenyuw at linux.intel.com>
---
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: 29832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20170823/178f1d63/attachment-0001.gz>
More information about the intel-gvt-dev
mailing list