[PATCH] drm/amdgpu: Clean up errors in mxgpu_nv.c

Ran Sun posted 1 patch 2 years, 6 months ago
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
[PATCH] drm/amdgpu: Clean up errors in mxgpu_nv.c
Posted by Ran Sun 2 years, 6 months ago
Fix the following errors reported by checkpatch:

ERROR: else should follow close brace '}'
ERROR: that open brace { should be on the previous line

Signed-off-by: Ran Sun <sunran001@208suo.com>
---
 drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
index cae1aaa4ddb6..6a68ee946f1c 100644
--- a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
+++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
@@ -183,12 +183,10 @@ static int xgpu_nv_send_access_requests(struct amdgpu_device *adev,
 			if (req != IDH_REQ_GPU_INIT_DATA) {
 				pr_err("Doesn't get msg:%d from pf, error=%d\n", event, r);
 				return r;
-			}
-			else /* host doesn't support REQ_GPU_INIT_DATA handshake */
+			} else /* host doesn't support REQ_GPU_INIT_DATA handshake */
 				adev->virt.req_init_data_ver = 0;
 		} else {
-			if (req == IDH_REQ_GPU_INIT_DATA)
-			{
+			if (req == IDH_REQ_GPU_INIT_DATA) {
 				adev->virt.req_init_data_ver =
 					RREG32_NO_KIQ(mmMAILBOX_MSGBUF_RCV_DW1);
 
-- 
2.17.1
Re: [PATCH] drm/amdgpu: Clean up errors in mxgpu_nv.c
Posted by Alex Deucher 2 years, 6 months ago
Applied.  Thanks!

On Wed, Aug 2, 2023 at 3:06 AM Ran Sun <sunran001@208suo.com> wrote:
>
> Fix the following errors reported by checkpatch:
>
> ERROR: else should follow close brace '}'
> ERROR: that open brace { should be on the previous line
>
> Signed-off-by: Ran Sun <sunran001@208suo.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
> index cae1aaa4ddb6..6a68ee946f1c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
> @@ -183,12 +183,10 @@ static int xgpu_nv_send_access_requests(struct amdgpu_device *adev,
>                         if (req != IDH_REQ_GPU_INIT_DATA) {
>                                 pr_err("Doesn't get msg:%d from pf, error=%d\n", event, r);
>                                 return r;
> -                       }
> -                       else /* host doesn't support REQ_GPU_INIT_DATA handshake */
> +                       } else /* host doesn't support REQ_GPU_INIT_DATA handshake */
>                                 adev->virt.req_init_data_ver = 0;
>                 } else {
> -                       if (req == IDH_REQ_GPU_INIT_DATA)
> -                       {
> +                       if (req == IDH_REQ_GPU_INIT_DATA) {
>                                 adev->virt.req_init_data_ver =
>                                         RREG32_NO_KIQ(mmMAILBOX_MSGBUF_RCV_DW1);
>
> --
> 2.17.1
>