Skip to contentSkip to conversation

drm/amdgpu: Clean up errors in vcn_v3_0.c

PATCH Applied Ran Sun 2 participants 2 messages Aug 2, 2023 – Aug 7, 2023

Subsystems (2)
lore
Share & tools
lore

Ran Sun

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Clean up errors in vcn_v3_0.c

Fix the following errors reported by checkpatch:

ERROR: space required before the open brace '{'
ERROR: "foo * bar" should be "foo *bar"
ERROR: space required before the open parenthesis '('
ERROR: that open brace { should be on the previous line

---
 drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +5 -6
index b76ba21b5a89..1e7613bb80ae 100644
@@ -1105,7 +1105,7 @@ static int vcn_v3_0_start(struct amdgpu_device *adev)
 		if (adev->vcn.harvest_config & (1 << i))
 			continue;
 
-		if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG){
+		if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) {
 			r = vcn_v3_0_start_dpg_mode(adev, i, adev->vcn.indirect_sram);
 			continue;
 		}
@@ -1789,7 +1789,7 @@ static int vcn_v3_0_dec_msg(struct amdgpu_cs_parser *p, struct amdgpu_job *job,
 	struct amdgpu_bo *bo;
 	uint64_t start, end;
 	unsigned int i;
-	void * ptr;
+	void *ptr;
 	int r;
 
 	addr &= AMDGPU_GMC_HOLE_MASK;
@@ -2129,7 +2129,7 @@ static int vcn_v3_0_set_powergating_state(void *handle,
 		return 0;
 	}
 
-	if(state == adev->vcn.cur_state)
+	if (state == adev->vcn.cur_state)
 		return 0;
 
 	if (state == AMD_PG_STATE_GATE)
@@ -2137,7 +2137,7 @@ static int vcn_v3_0_set_powergating_state(void *handle,
 	else
 		ret = vcn_v3_0_start(adev);
 
-	if(!ret)
+	if (!ret)
 		adev->vcn.cur_state = state;
 
 	return ret;
@@ -2228,8 +2228,7 @@ static const struct amd_ip_funcs vcn_v3_0_ip_funcs = {
 	.set_powergating_state = vcn_v3_0_set_powergating_state,
 };
 
-const struct amdgpu_ip_block_version vcn_v3_0_ip_block =
-{
+const struct amdgpu_ip_block_version vcn_v3_0_ip_block = {
 	.type = AMD_IP_BLOCK_TYPE_VCN,
 	.major = 3,
 	.minor = 0,
Signature · 1 line
2.17.1
Applied
#1 lore raw

Applied. Thanks!

Quoted 66 lines · Ran Sun

Fix the following errors reported by checkpatch:

ERROR: space required before the open brace '{'
ERROR: "foo * bar" should be "foo *bar"
ERROR: space required before the open parenthesis '('
ERROR: that open brace { should be on the previous line

---
 drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +5 -7
index b76ba21b5a89..1e7613bb80ae 100644
@@ -1105,7 +1105,7 @@ static int vcn_v3_0_start(struct amdgpu_device *adev)
                if (adev->vcn.harvest_config & (1 << i))
                        continue;
 
-               if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG){
+               if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) {
                        r = vcn_v3_0_start_dpg_mode(adev, i, adev->vcn.indirect_sram);
                        continue;
                }
@@ -1789,7 +1789,7 @@ static int vcn_v3_0_dec_msg(struct amdgpu_cs_parser *p, struct amdgpu_job *job,
        struct amdgpu_bo *bo;
        uint64_t start, end;
        unsigned int i;
-       void * ptr;
+       void *ptr;
        int r;
 
        addr &= AMDGPU_GMC_HOLE_MASK;
@@ -2129,7 +2129,7 @@ static int vcn_v3_0_set_powergating_state(void *handle,
                return 0;
        }
 
-       if(state == adev->vcn.cur_state)
+       if (state == adev->vcn.cur_state)
                return 0;
 
        if (state == AMD_PG_STATE_GATE)
@@ -2137,7 +2137,7 @@ static int vcn_v3_0_set_powergating_state(void *handle,
        else
                ret = vcn_v3_0_start(adev);
 
-       if(!ret)
+       if (!ret)
                adev->vcn.cur_state = state;
 
        return ret;
@@ -2228,8 +2228,7 @@ static const struct amd_ip_funcs vcn_v3_0_ip_funcs = {
        .set_powergating_state = vcn_v3_0_set_powergating_state,
 };
 
-const struct amdgpu_ip_block_version vcn_v3_0_ip_block =
-{
+const struct amdgpu_ip_block_version vcn_v3_0_ip_block = {
        .type = AMD_IP_BLOCK_TYPE_VCN,
        .major = 3,
        .minor = 0,
--

2.17.1