[PATCH v2 7/7] drm/msm/dpu: Make _dpu_plane_get_aspace void

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

 



Remove unneeded checks from _dpu_plane_get_aspace. The function
no longer needs to return anything so it is changed to void.

Signed-off-by: Bruce Wang <bzwang@xxxxxxxxxxxx>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 25 ++++-------------------
 1 file changed, 4 insertions(+), 21 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index f9e65acdf87e..59f019685658 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -434,23 +434,14 @@ static void _dpu_plane_set_qos_remap(struct drm_plane *plane)
 /**
  * _dpu_plane_get_aspace: gets the address space
  */
-static int _dpu_plane_get_aspace(
+static void _dpu_plane_get_aspace(
 		struct dpu_plane *pdpu,
 		struct dpu_plane_state *pstate,
 		struct msm_gem_address_space **aspace)
 {
-	struct dpu_kms *kms;
-
-	if (!pdpu || !pstate || !aspace) {
-		DPU_ERROR("invalid parameters\n");
-		return -EINVAL;
-	}
-
-	kms = _dpu_plane_get_kms(&pdpu->base);
+	struct dpu_kms *kms = _dpu_plane_get_kms(&pdpu->base);
 
 	*aspace = kms->base.aspace;
-
-	return 0;
 }
 
 static inline void _dpu_plane_set_scanout(struct drm_plane *plane,
@@ -471,11 +462,7 @@ static inline void _dpu_plane_set_scanout(struct drm_plane *plane,
 
 	pdpu = to_dpu_plane(plane);
 
-	ret = _dpu_plane_get_aspace(pdpu, pstate, &aspace);
-	if (ret) {
-		DPU_ERROR_PLANE(pdpu, "Failed to get aspace %d\n", ret);
-		return;
-	}
+	_dpu_plane_get_aspace(pdpu, pstate, &aspace);
 
 	ret = dpu_format_populate_layout(aspace, fb, &pipe_cfg->layout);
 	if (ret == -EAGAIN)
@@ -836,11 +823,7 @@ static int dpu_plane_prepare_fb(struct drm_plane *plane,
 
 	DPU_DEBUG_PLANE(pdpu, "FB[%u]\n", fb->base.id);
 
-	ret = _dpu_plane_get_aspace(pdpu, pstate, &aspace);
-	if (ret) {
-		DPU_ERROR_PLANE(pdpu, "Failed to get aspace\n");
-		return ret;
-	}
+	_dpu_plane_get_aspace(pdpu, pstate, &aspace);
 
 	/* cache aspace */
 	pstate->aspace = aspace;
-- 
2.19.0.444.g18242da7ef-goog




[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