drm/amdgpu/jpeg: remove redundant check when it returns
Subsystems (2)
PATCH 1/1 drm/amdgpu/jpeg: remove redundant check when it returns
Fix warning from kernel test robot
--- drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c +0 -2
@@ -465,8 +465,6 @@ static int jpeg_v3_0_wait_for_idle(void *handle) ret =SOC15_WAIT_ON_RREG (JPEG ,0 , mmUVD_JRBC_STATUS,UVD_JRBC_STATUS__RB_JOB_DONE_MASK ,UVD_JRBC_STATUS__RB_JOB_DONE_MASK ); -if (ret) -return ret;return ret; }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Public Use]
________________________________
From: amd-gfx <[email protected]> on behalf of Leo Liu <[email protected]>
Sent: Thursday, August 13, 2020 3:40 PM
To: [email protected] <[email protected]>
Cc: Liu, Leo <[email protected]>
Subject: [PATCH] drm/amdgpu/jpeg: remove redundant check when it returns
Fix warning from kernel test robot
--- drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c +0 -2
@@ -465,8 +465,6 @@ static int jpeg_v3_0_wait_for_idle(void *handle) ret =SOC15_WAIT_ON_RREG (JPEG ,0 , mmUVD_JRBC_STATUS,UVD_JRBC_STATUS__RB_JOB_DONE_MASK ,UVD_JRBC_STATUS__RB_JOB_DONE_MASK ); -if (ret) -return ret;return ret; }
--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Calexander.deucher%40amd.com%7C3024a7a58bf24bc3731b08d83fc0df59%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637329444922074471&sdata=VqEE7z0JlPSNE0nH3HFISbRGPF7tC0uNgBB3yJnSSHo%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 13.08.20 um 21:40 schrieb Leo Liu:
Quoted 12 lines
Fix warning from kernel test robot
Signed-off-by Leo Liu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c static int jpeg_v3_0_wait_for_idle(void *handle) · line 469
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c +0
-2@@ -465,8 +465,6 @@ static int jpeg_v3_0_wait_for_idle(void *handle) ret =SOC15_WAIT_ON_RREG (JPEG ,0 , mmUVD_JRBC_STATUS,UVD_JRBC_STATUS__RB_JOB_DONE_MASK ,UVD_JRBC_STATUS__RB_JOB_DONE_MASK ); -if (ret) -return ret;return ret;
You will probably get the next warning from the test robot with that because it can be simplified to "return SOC15_"...
Maybe even the local variable ret can be dropped, depending on what else it is used for in the function.
Christian.
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c static int jpeg_v3_0_wait_for_idle(void *handle) · line 470
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c +0
-0}
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 1/1 drm/amdgpu/jpeg: remove redundant check when it returns
In reply to Leo LiuFix warning from kernel test robot
v2: remove the local variable as well
--- drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c +1 -6
@@ -460,15 +460,10 @@ static bool jpeg_v3_0_is_idle(void *handle)static int jpeg_v3_0_wait_for_idle (void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; -int ret; - ret =SOC15_WAIT_ON_RREG (JPEG ,0 , mmUVD_JRBC_STATUS, +return SOC15_WAIT_ON_RREG (JPEG ,0 , mmUVD_JRBC_STATUS,UVD_JRBC_STATUS__RB_JOB_DONE_MASK ,UVD_JRBC_STATUS__RB_JOB_DONE_MASK ); -if (ret) -return ret; - -return ret; } static int jpeg_v3_0_set_clockgating_state(void *handle,
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 20 lines · Leo Liu
Fix warning from kernel test robot
v2: remove the local variable as wellSigned-off-by Leo Liu <[email protected]>Reviewed-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c +0
-2@@ -460,15 +460,10 @@ static bool jpeg_v3_0_is_idle(void *handle)static int jpeg_v3_0_wait_for_idle (void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; -int ret; - ret = SOC15_WAIT_ON_RREG(JPEG, 0, mmUVD_JRBC_STATUS,
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c static bool jpeg_v3_0_is_idle(void *handle) · line 469
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c +1
-4+return SOC15_WAIT_ON_RREG (JPEG ,0 , mmUVD_JRBC_STATUS,UVD_JRBC_STATUS__RB_JOB_DONE_MASK ,UVD_JRBC_STATUS__RB_JOB_DONE_MASK ); -if (ret) -return ret; - -return ret; } static int jpeg_v3_0_set_clockgating_state(void *handle,
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx