drm/vc4: make vc4_queue_seqno_cb() return void
Subsystems (4)
PATCH 1/1 drm/vc4: make vc4_queue_seqno_cb() return void
No one uses the return value of this function, so make it return void. This fixes the following coccicheck warning:
drivers/gpu/drm/vc4/vc4_gem.c:1029:5-8: Unneeded variable: "ret". Return "0" on line 1044
Signed-off-by Jason Yan <[email protected]>
--- drivers/gpu/drm/vc4/vc4_drv.h | 6 +++--- drivers/gpu/drm/vc4/vc4_gem.c | 9 +++------ 2 files changed, 6 insertions(+), 9 deletions(-)
drivers/gpu/drm/vc4/vc4_drv.h +3 -3
@@ -810,9 +810,9 @@ void vc4_move_job_to_render(struct drm_device *dev, struct vc4_exec_info *exec);int vc4_wait_for_seqno (struct drm_device *dev,uint64_t seqno,uint64_t timeout_ns,bool interruptible);void vc4_job_handle_completed (struct vc4_dev *vc4); -int vc4_queue_seqno_cb (struct drm_device *dev, -struct vc4_seqno_cb *cb,uint64_t seqno, -void (*func)(struct vc4_seqno_cb *cb)); +void vc4_queue_seqno_cb (struct drm_device *dev, +struct vc4_seqno_cb *cb,uint64_t seqno, +void (*func)(struct vc4_seqno_cb *cb));int vc4_gem_madvise_ioctl (struct drm_device *dev,void *data,struct drm_file *file_priv);
drivers/gpu/drm/vc4/vc4_gem.c +3 -6
@@ -1021,12 +1021,11 @@ static void vc4_seqno_cb_work(struct work_struct *work) cb->func (cb); } -int vc4_queue_seqno_cb (struct drm_device *dev, -struct vc4_seqno_cb *cb,uint64_t seqno, -void (*func)(struct vc4_seqno_cb *cb)) +void vc4_queue_seqno_cb (struct drm_device *dev, +struct vc4_seqno_cb *cb,uint64_t seqno, +void (*func)(struct vc4_seqno_cb *cb)) {struct vc4_dev *vc4 =to_vc4_dev (dev); -int ret =0 ;unsigned long irqflags; cb->func = func;
@@ -1040,8 +1039,6 @@ int vc4_queue_seqno_cb(struct drm_device *dev,schedule_work (&cb->work); }spin_unlock_irqrestore (&vc4->job_lock, irqflags); - -return ret; }/* Scheduled when any job has been completed, this walks the list of
Signature · 1 line
2.21.1