diff options
author | Nishka Dasgupta <nishkadg.linux@gmail.com> | 2019-06-25 23:47:09 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-06-26 09:58:48 +0800 |
commit | 4a808fa3aa48663d6432e1078dea498b0e72e5d2 (patch) | |
tree | c89026286b3d1cd7c1a2d515bf59e6b8a0c452b5 | |
parent | efe06b2317f9eca18caedfc852f94e312a250f66 (diff) |
staging: vc04_services: Remove function block_resume()
Remove function block_resume as it was only called by
vchiq_arm_force_suspend, which was removed in a previous patch.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index ebf7e2a3bd3b..cc4383d1ec3e 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -2554,72 +2554,6 @@ need_resume(struct vchiq_state *state) vchiq_videocore_wanted(state); } -static int -block_resume(struct vchiq_arm_state *arm_state) -{ - int status = VCHIQ_SUCCESS; - const unsigned long timeout_val = - msecs_to_jiffies(FORCE_SUSPEND_TIMEOUT_MS); - int resume_count = 0; - - /* Allow any threads which were blocked by the last force suspend to - * complete if they haven't already. Only give this one shot; if - * blocked_count is incremented after blocked_blocker is completed - * (which only happens when blocked_count hits 0) then those threads - * will have to wait until next time around */ - if (arm_state->blocked_count) { - reinit_completion(&arm_state->blocked_blocker); - write_unlock_bh(&arm_state->susp_res_lock); - vchiq_log_info(vchiq_susp_log_level, "%s wait for previously " - "blocked clients", __func__); - if (wait_for_completion_interruptible_timeout( - &arm_state->blocked_blocker, timeout_val) - <= 0) { - vchiq_log_error(vchiq_susp_log_level, "%s wait for " - "previously blocked clients failed", __func__); - status = VCHIQ_ERROR; - write_lock_bh(&arm_state->susp_res_lock); - goto out; - } - vchiq_log_info(vchiq_susp_log_level, "%s previously blocked " - "clients resumed", __func__); - write_lock_bh(&arm_state->susp_res_lock); - } - - /* We need to wait for resume to complete if it's in process */ - while (arm_state->vc_resume_state != VC_RESUME_RESUMED && - arm_state->vc_resume_state > VC_RESUME_IDLE) { - if (resume_count > 1) { - status = VCHIQ_ERROR; - vchiq_log_error(vchiq_susp_log_level, "%s waited too " - "many times for resume", __func__); - goto out; - } - write_unlock_bh(&arm_state->susp_res_lock); - vchiq_log_info(vchiq_susp_log_level, "%s wait for resume", - __func__); - if (wait_for_completion_interruptible_timeout( - &arm_state->vc_resume_complete, timeout_val) - <= 0) { - vchiq_log_error(vchiq_susp_log_level, "%s wait for " - "resume failed (%s)", __func__, - resume_state_names[arm_state->vc_resume_state + - VC_RESUME_NUM_OFFSET]); - status = VCHIQ_ERROR; - write_lock_bh(&arm_state->susp_res_lock); - goto out; - } - vchiq_log_info(vchiq_susp_log_level, "%s resumed", __func__); - write_lock_bh(&arm_state->susp_res_lock); - resume_count++; - } - reinit_completion(&arm_state->resume_blocker); - arm_state->resume_blocked = 1; - -out: - return status; -} - static inline void unblock_resume(struct vchiq_arm_state *arm_state) { |