lkml.org 
[lkml]   [2023]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] drm/amdgpu/amdgpu: Clean up errors in amdgpu_vf_error.c
Fix the following errors reported by checkpatch:

ERROR: space prohibited before open square bracket '['
ERROR: space prohibited before that '++' (ctx:WxO)
ERROR: spaces required around that '=' (ctx:WxV)

Signed-off-by: XueBing Chen <chenxuebing@jari.cn>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c | 12 ++++++------
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 1 +
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
index f9d3d79f68b1..1599e818c696 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
@@ -40,10 +40,10 @@ void amdgpu_vf_error_put(struct amdgpu_device *adev,

mutex_lock(&adev->virt.vf_errors.lock);
index = adev->virt.vf_errors.write_count % AMDGPU_VF_ERROR_ENTRY_SIZE;
- adev->virt.vf_errors.code [index] = error_code;
- adev->virt.vf_errors.flags [index] = error_flags;
- adev->virt.vf_errors.data [index] = error_data;
- adev->virt.vf_errors.write_count ++;
+ adev->virt.vf_errors.code[index] = error_code;
+ adev->virt.vf_errors.flags[index] = error_flags;
+ adev->virt.vf_errors.data[index] = error_data;
+ adev->virt.vf_errors.write_count++;
mutex_unlock(&adev->virt.vf_errors.lock);
}

@@ -73,14 +73,14 @@ void amdgpu_vf_error_trans_all(struct amdgpu_device *adev)
}

while (adev->virt.vf_errors.read_count < adev->virt.vf_errors.write_count) {
- index =adev->virt.vf_errors.read_count % AMDGPU_VF_ERROR_ENTRY_SIZE;
+ index = adev->virt.vf_errors.read_count % AMDGPU_VF_ERROR_ENTRY_SIZE;
data1 = AMDGIM_ERROR_CODE_FLAGS_TO_MAILBOX(adev->virt.vf_errors.code[index],
adev->virt.vf_errors.flags[index]);
data2 = adev->virt.vf_errors.data[index] & 0xFFFFFFFF;
data3 = (adev->virt.vf_errors.data[index] >> 32) & 0xFFFFFFFF;

adev->virt.ops->trans_msg(adev, IDH_LOG_VF_ERROR, data1, data2, data3);
- adev->virt.vf_errors.read_count ++;
+ adev->virt.vf_errors.read_count++;
}
mutex_unlock(&adev->virt.vf_errors.lock);
}
diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c b/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
index f52e0278abf9..587586ecdddb 100644
--- a/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
+++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
@@ -340,6 +340,7 @@ static int xgpu_ai_mailbox_rcv_irq(struct amdgpu_device *adev,
}


+
return 0;
}

--
2.17.1
\
 
 \ /
  Last update: 2023-08-23 12:52    [W:0.039 / U:0.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site