[PATCH] drm/msm/dpu: make _dpu_core_perf_crtc_update_bus() void

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This function does not need to return an error so make it return void.
This fixes the following coccicheck warning:

drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:178:5-8: Unneeded
variable: "ret". Return "0" on line 193

Signed-off-by: Jason Yan <yanaijie@xxxxxxxxxx>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
index 11f2bebe3869..12df1955b1ef 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
@@ -167,7 +167,7 @@ int dpu_core_perf_crtc_check(struct drm_crtc *crtc,
 	return 0;
 }
 
-static int _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms,
+static void _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms,
 		struct drm_crtc *crtc)
 {
 	struct dpu_core_perf_params perf = { 0 };
@@ -175,7 +175,6 @@ static int _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms,
 					= dpu_crtc_get_client_type(crtc);
 	struct drm_crtc *tmp_crtc;
 	struct dpu_crtc_state *dpu_cstate;
-	int ret = 0;
 
 	drm_for_each_crtc(tmp_crtc, crtc->dev) {
 		if (tmp_crtc->enabled &&
@@ -190,7 +189,6 @@ static int _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms,
 					dpu_cstate->new_perf.bw_ctl);
 		}
 	}
-	return ret;
 }
 
 /**
@@ -335,14 +333,8 @@ int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
 	trace_dpu_perf_crtc_update(crtc->base.id, new->bw_ctl,
 		new->core_clk_rate, stop_req, update_bus, update_clk);
 
-	if (update_bus) {
-		ret = _dpu_core_perf_crtc_update_bus(kms, crtc);
-		if (ret) {
-			DPU_ERROR("crtc-%d: failed to update bus bw vote\n",
-				  crtc->base.id);
-			return ret;
-		}
-	}
+	if (update_bus)
+		_dpu_core_perf_crtc_update_bus(kms, crtc);
 
 	/*
 	 * Update the clock after bandwidth vote to ensure
-- 
2.21.1




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux