drm/i915/gvt: cleanup a type issue in submit_context()
PATCH 1/1 drm/i915/gvt: cleanup a type issue in submit_context()
submit_context() should return negative error codes and zero on success but by mistake we made it a bool. I've changed it to int. Also I made it static because this isn't referenced in any other files.
This doesn't affect runtime because the return is eventually propogated to elsp_mmio_write() where it is ignored.
drivers/gpu/drm/i915/gvt/execlist.c +1 -1
@@ -616,7 +616,7 @@ static int prepare_mm(struct intel_vgpu_workload *workload) (list_empty (q) ?NULL :container_of (q->prev, \ struct intel_vgpu_workload, list)) -bool submit_context (struct intel_vgpu *vgpu,int ring_id, +static int submit_context (struct intel_vgpu *vgpu,int ring_id,struct execlist_ctx_descriptor_format *desc,bool emulate_schedule_in) {
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 14 lines · Dan Carpenter
submit_context()should return negative error codes and zero on success but by mistake we made it a bool. I've changed it to int. Also I made it static because this isn't referenced in any other files.This doesn't affect runtime because the return is eventually propogated to
elsp_mmio_write()where it is ignored.Signed-off-by Dan Carpenter <[email protected]>drivers/gpu/drm/i915/gvt/execlist.c +0
-0
drivers/gpu/drm/i915/gvt/execlist.c static int prepare_mm(struct intel_vgpu_workload *workload) · line 622
Quoted 8 lines
drivers/gpu/drm/i915/gvt/execlist.c +1
-1@@ -616,7 +616,7 @@ static int prepare_mm(struct intel_vgpu_workload *workload) (list_empty (q) ?NULL :container_of (q->prev, \ struct intel_vgpu_workload, list)) -bool submit_context (struct intel_vgpu *vgpu,int ring_id, +static int submit_context (struct intel_vgpu *vgpu,int ring_id,struct execlist_ctx_descriptor_format *desc,bool emulate_schedule_in) {
Dan, this has been fixed in our recent pull, should hit linux-next very soon.
thanks
Signature · 3 lines
Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
Quoted 18 lines · Zhenyu Wang
Quoted 17 lines · Dan Carpenter
submit_context()should return negative error codes and zero on success but by mistake we made it a bool. I've changed it to int. Also I made it static because this isn't referenced in any other files.This doesn't affect runtime because the return is eventually propogated to
elsp_mmio_write()where it is ignored.Signed-off-by Dan Carpenter <[email protected]>drivers/gpu/drm/i915/gvt/execlist.c +0
-0@@ -616,7 +616,7 @@ static int prepare_mm(struct intel_vgpu_workload *workload) (list_empty (q) ?NULL :container_of (q->prev, \ struct intel_vgpu_workload, list))
Quoted 8 lines
drivers/gpu/drm/i915/gvt/execlist.c static int prepare_mm(struct intel_vgpu_workload *workload) · line 622
Quoted 5 lines
drivers/gpu/drm/i915/gvt/execlist.c +1
-1-bool submit_context (struct intel_vgpu *vgpu,int ring_id, +static int submit_context (struct intel_vgpu *vgpu,int ring_id,struct execlist_ctx_descriptor_format *desc,bool emulate_schedule_in) {Dan, this has been fixed in our recent pull, should hit linux-next very soon.
Could you review elsp_mmio_write() as well? Should we be doing something with that return value?
regards,
dan carpenter
Quoted 28 lines · Dan Carpenter
Quoted 18 lines · Zhenyu Wang
Quoted 17 lines · Dan Carpenter
submit_context()should return negative error codes and zero on success but by mistake we made it a bool. I've changed it to int. Also I made it static because this isn't referenced in any other files.This doesn't affect runtime because the return is eventually propogated to
elsp_mmio_write()where it is ignored.Signed-off-by Dan Carpenter <[email protected]>drivers/gpu/drm/i915/gvt/execlist.c +0
-0@@ -616,7 +616,7 @@ static int prepare_mm(struct intel_vgpu_workload *workload) (list_empty (q) ?NULL :container_of (q->prev, \ struct intel_vgpu_workload, list))Quoted 8 lines
drivers/gpu/drm/i915/gvt/execlist.c static int prepare_mm(struct intel_vgpu_workload *workload) · line 622
Quoted 5 lines
drivers/gpu/drm/i915/gvt/execlist.c +1
-1-bool submit_context (struct intel_vgpu *vgpu,int ring_id, +static int submit_context (struct intel_vgpu *vgpu,int ring_id,struct execlist_ctx_descriptor_format *desc,bool emulate_schedule_in) {Dan, this has been fixed in our recent pull, should hit linux-next very soon.
Quoted 3 lines
Could you review
elsp_mmio_write()as well? Should we be doing something with that return value?
yeah, ignore return value is not good, will fix that. Thanks!
Zhi, could you double check error path for elsp write?
Signature · 3 lines
Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
Quoted 6 lines · Dan Carpenter
submit_context()should return negative error codes and zero on success but by mistake we made it a bool. I've changed it to int. Also I made it static because this isn't referenced in any other files.This doesn't affect runtime because the return is eventually propogated to
elsp_mmio_write()where it is ignored.
Thanks Dan, your work in finding these is always appreciated (as is smatch!)
Should be fixed by
commit 76a79d59ada00fa22e5f8cd94b36296f395c3406
Author: Du, Changbin <[email protected]> Date: Thu Oct 20 14:08:48 2016 +0800
drm/i915/gvt: fix spare warnings on odd constant _Bool cast
The function return values should has type int if it return a integer value.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre