linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] drm/amdgpu: Remove the unneeded result variable
@ 2022-08-26  7:23 cgel.zte
  2022-08-26 20:38 ` Alex Deucher
  0 siblings, 1 reply; 4+ messages in thread
From: cgel.zte @ 2022-08-26  7:23 UTC (permalink / raw)
  To: alexander.deucher
  Cc: christian.koenig, Xinhui.Pan, airlied, daniel, Hawking.Zhang,
	Jack.Xiao, guchun.chen, Prike.Liang, ricetons, Bokun.Zhang,
	amd-gfx, dri-devel, linux-kernel, ye xingchen, Zeal Robot

From: ye xingchen <ye.xingchen@zte.com.cn>

Return the value sdma_v5_2_start() directly instead of storing it in
another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
index 83c6ccaaa9e4..95689ef4be10 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
@@ -1413,12 +1413,9 @@ static int sdma_v5_2_sw_fini(void *handle)
 
 static int sdma_v5_2_hw_init(void *handle)
 {
-	int r;
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-	r = sdma_v5_2_start(adev);
-
-	return r;
+	return sdma_v5_2_start(adev);
 }
 
 static int sdma_v5_2_hw_fini(void *handle)
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH linux-next] drm/amdgpu: Remove the unneeded result variable
  2022-08-26  7:23 [PATCH linux-next] drm/amdgpu: Remove the unneeded result variable cgel.zte
@ 2022-08-26 20:38 ` Alex Deucher
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2022-08-26 20:38 UTC (permalink / raw)
  To: cgel.zte
  Cc: alexander.deucher, Jack.Xiao, guchun.chen, airlied, Bokun.Zhang,
	Zeal Robot, Xinhui.Pan, ricetons, linux-kernel, amd-gfx,
	Prike.Liang, dri-devel, ye xingchen, christian.koenig,
	Hawking.Zhang

Applied.  Thanks!

Alex

On Fri, Aug 26, 2022 at 3:24 AM <cgel.zte@gmail.com> wrote:
>
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Return the value sdma_v5_2_start() directly instead of storing it in
> another redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
> ---
>  drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> index 83c6ccaaa9e4..95689ef4be10 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
> @@ -1413,12 +1413,9 @@ static int sdma_v5_2_sw_fini(void *handle)
>
>  static int sdma_v5_2_hw_init(void *handle)
>  {
> -       int r;
>         struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>
> -       r = sdma_v5_2_start(adev);
> -
> -       return r;
> +       return sdma_v5_2_start(adev);
>  }
>
>  static int sdma_v5_2_hw_fini(void *handle)
> --
> 2.25.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH linux-next] drm/amdgpu: Remove the unneeded result variable
  2022-09-02  8:04 cgel.zte
@ 2022-09-09 20:46 ` Alex Deucher
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2022-09-09 20:46 UTC (permalink / raw)
  To: cgel.zte
  Cc: alexander.deucher, Jack.Xiao, airlied, Zeal Robot, Xinhui.Pan,
	linux-kernel, amd-gfx, ray.huang, Stanley.Yang, dri-devel,
	Likun.Gao, zhang.songyi, christian.koenig, Hawking.Zhang

Applied.  Thanks!

Alex

On Fri, Sep 2, 2022 at 4:04 AM <cgel.zte@gmail.com> wrote:
>
> From: zhang songyi <zhang.songyi@zte.com.cn>
>
> Return the sdma_v6_0_start() directly instead of storing it in another
> redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
> ---
>  drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
> index 2bc1407e885e..2cc2d851b4eb 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
> @@ -1373,12 +1373,9 @@ static int sdma_v6_0_sw_fini(void *handle)
>
>  static int sdma_v6_0_hw_init(void *handle)
>  {
> -       int r;
>         struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>
> -       r = sdma_v6_0_start(adev);
> -
> -       return r;
> +       return sdma_v6_0_start(adev);
>  }
>
>  static int sdma_v6_0_hw_fini(void *handle)
> --
> 2.25.1
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH linux-next] drm/amdgpu: Remove the unneeded result variable
@ 2022-09-02  8:04 cgel.zte
  2022-09-09 20:46 ` Alex Deucher
  0 siblings, 1 reply; 4+ messages in thread
From: cgel.zte @ 2022-09-02  8:04 UTC (permalink / raw)
  To: alexander.deucher
  Cc: christian.koenig, Xinhui.Pan, airlied, daniel, Hawking.Zhang,
	Likun.Gao, zhang.songyi, ray.huang, Stanley.Yang, Jack.Xiao,
	amd-gfx, dri-devel, linux-kernel, Zeal Robot

From: zhang songyi <zhang.songyi@zte.com.cn>

Return the sdma_v6_0_start() directly instead of storing it in another
redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
index 2bc1407e885e..2cc2d851b4eb 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c
@@ -1373,12 +1373,9 @@ static int sdma_v6_0_sw_fini(void *handle)
 
 static int sdma_v6_0_hw_init(void *handle)
 {
-	int r;
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-	r = sdma_v6_0_start(adev);
-
-	return r;
+	return sdma_v6_0_start(adev);
 }
 
 static int sdma_v6_0_hw_fini(void *handle)
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-09 20:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-26  7:23 [PATCH linux-next] drm/amdgpu: Remove the unneeded result variable cgel.zte
2022-08-26 20:38 ` Alex Deucher
2022-09-02  8:04 cgel.zte
2022-09-09 20:46 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).