diff mbox series

[1/2] drm/msm/adreno: Make adreno_gpu_state_get() return void

Message ID 1544443462-28736-1-git-send-email-smasetty@codeaurora.org (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/msm/adreno: Make adreno_gpu_state_get() return void | expand

Commit Message

Sharat Masetty Dec. 10, 2018, 12:04 p.m. UTC
We are not really checking the state of the adreno_gpu_state_get()
function at the callers and in addition the state capture is mostly a
best effort service, so make the function return void.

Signed-off-by: Sharat Masetty <smasetty@codeaurora.org>
---
 drivers/gpu/drm/msm/adreno/adreno_gpu.c | 4 +---
 drivers/gpu/drm/msm/adreno/adreno_gpu.h | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

Comments

Jordan Crouse Dec. 10, 2018, 4:04 p.m. UTC | #1
On Mon, Dec 10, 2018 at 05:34:21PM +0530, Sharat Masetty wrote:
> We are not really checking the state of the adreno_gpu_state_get()
> function at the callers and in addition the state capture is mostly a
> best effort service, so make the function return void.

Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
> Signed-off-by: Sharat Masetty <smasetty@codeaurora.org>
> ---
>  drivers/gpu/drm/msm/adreno/adreno_gpu.c | 4 +---
>  drivers/gpu/drm/msm/adreno/adreno_gpu.h | 2 +-
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> index 1ca4bea..40bcf32 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> @@ -380,7 +380,7 @@ bool adreno_idle(struct msm_gpu *gpu, struct msm_ringbuffer *ring)
>  	return false;
>  }
>  
> -int adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state)
> +void adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state)
>  {
>  	struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
>  	int i, count = 0;
> @@ -437,8 +437,6 @@ int adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state)
>  
>  		state->nr_registers = count;
>  	}
> -
> -	return 0;
>  }
>  
>  void adreno_gpu_state_destroy(struct msm_gpu_state *state)
> diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
> index 4973c8c..d4834b3 100644
> --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h
> +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
> @@ -235,7 +235,7 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
>  
>  void adreno_gpu_state_destroy(struct msm_gpu_state *state);
>  
> -int adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state);
> +void adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state);
>  int adreno_gpu_state_put(struct msm_gpu_state *state);
>  
>  /* ringbuffer helpers (the parts that are adreno specific) */
> -- 
> 1.9.1
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index 1ca4bea..40bcf32 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
@@ -380,7 +380,7 @@  bool adreno_idle(struct msm_gpu *gpu, struct msm_ringbuffer *ring)
 	return false;
 }
 
-int adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state)
+void adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state)
 {
 	struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
 	int i, count = 0;
@@ -437,8 +437,6 @@  int adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state)
 
 		state->nr_registers = count;
 	}
-
-	return 0;
 }
 
 void adreno_gpu_state_destroy(struct msm_gpu_state *state)
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
index 4973c8c..d4834b3 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
@@ -235,7 +235,7 @@  int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
 
 void adreno_gpu_state_destroy(struct msm_gpu_state *state);
 
-int adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state);
+void adreno_gpu_state_get(struct msm_gpu *gpu, struct msm_gpu_state *state);
 int adreno_gpu_state_put(struct msm_gpu_state *state);
 
 /* ringbuffer helpers (the parts that are adreno specific) */