Skip to content

Commit 7b57c54

Browse files
Ran Sunalexdeucher
authored andcommitted
drm/amdgpu: Clean up errors in gfx_v7_0.c
Fix the following errors reported by checkpatch: ERROR: that open brace { should be on the previous line ERROR: trailing statements should be on next line ERROR: open brace '{' following struct go on the same line ERROR: space prohibited before that '++' (ctx:WxB) Signed-off-by: Ran Sun <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 2b2b585 commit 7b57c54

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ MODULE_FIRMWARE("amdgpu/mullins_ce.bin");
9090
MODULE_FIRMWARE("amdgpu/mullins_rlc.bin");
9191
MODULE_FIRMWARE("amdgpu/mullins_mec.bin");
9292

93-
static const struct amdgpu_gds_reg_offset amdgpu_gds_reg_offset[] =
94-
{
93+
static const struct amdgpu_gds_reg_offset amdgpu_gds_reg_offset[] = {
9594
{mmGDS_VMID0_BASE, mmGDS_VMID0_SIZE, mmGDS_GWS_VMID0, mmGDS_OA_VMID0},
9695
{mmGDS_VMID1_BASE, mmGDS_VMID1_SIZE, mmGDS_GWS_VMID1, mmGDS_OA_VMID1},
9796
{mmGDS_VMID2_BASE, mmGDS_VMID2_SIZE, mmGDS_GWS_VMID2, mmGDS_OA_VMID2},
@@ -110,8 +109,7 @@ static const struct amdgpu_gds_reg_offset amdgpu_gds_reg_offset[] =
110109
{mmGDS_VMID15_BASE, mmGDS_VMID15_SIZE, mmGDS_GWS_VMID15, mmGDS_OA_VMID15}
111110
};
112111

113-
static const u32 spectre_rlc_save_restore_register_list[] =
114-
{
112+
static const u32 spectre_rlc_save_restore_register_list[] = {
115113
(0x0e00 << 16) | (0xc12c >> 2),
116114
0x00000000,
117115
(0x0e00 << 16) | (0xc140 >> 2),
@@ -557,8 +555,7 @@ static const u32 spectre_rlc_save_restore_register_list[] =
557555
(0x0e00 << 16) | (0x9600 >> 2),
558556
};
559557

560-
static const u32 kalindi_rlc_save_restore_register_list[] =
561-
{
558+
static const u32 kalindi_rlc_save_restore_register_list[] = {
562559
(0x0e00 << 16) | (0xc12c >> 2),
563560
0x00000000,
564561
(0x0e00 << 16) | (0xc140 >> 2),
@@ -933,7 +930,8 @@ static int gfx_v7_0_init_microcode(struct amdgpu_device *adev)
933930
case CHIP_MULLINS:
934931
chip_name = "mullins";
935932
break;
936-
default: BUG();
933+
default:
934+
BUG();
937935
}
938936

939937
snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_pfp.bin", chip_name);
@@ -2759,8 +2757,7 @@ static int gfx_v7_0_mec_init(struct amdgpu_device *adev)
27592757
return 0;
27602758
}
27612759

2762-
struct hqd_registers
2763-
{
2760+
struct hqd_registers {
27642761
u32 cp_mqd_base_addr;
27652762
u32 cp_mqd_base_addr_hi;
27662763
u32 cp_hqd_active;
@@ -5124,11 +5121,11 @@ static void gfx_v7_0_get_cu_info(struct amdgpu_device *adev)
51245121
bitmap = gfx_v7_0_get_cu_active_bitmap(adev);
51255122
cu_info->bitmap[i][j] = bitmap;
51265123

5127-
for (k = 0; k < adev->gfx.config.max_cu_per_sh; k ++) {
5124+
for (k = 0; k < adev->gfx.config.max_cu_per_sh; k++) {
51285125
if (bitmap & mask) {
51295126
if (counter < ao_cu_num)
51305127
ao_bitmap |= mask;
5131-
counter ++;
5128+
counter++;
51325129
}
51335130
mask <<= 1;
51345131
}
@@ -5150,26 +5147,23 @@ static void gfx_v7_0_get_cu_info(struct amdgpu_device *adev)
51505147
cu_info->lds_size = 64;
51515148
}
51525149

5153-
const struct amdgpu_ip_block_version gfx_v7_1_ip_block =
5154-
{
5150+
const struct amdgpu_ip_block_version gfx_v7_1_ip_block = {
51555151
.type = AMD_IP_BLOCK_TYPE_GFX,
51565152
.major = 7,
51575153
.minor = 1,
51585154
.rev = 0,
51595155
.funcs = &gfx_v7_0_ip_funcs,
51605156
};
51615157

5162-
const struct amdgpu_ip_block_version gfx_v7_2_ip_block =
5163-
{
5158+
const struct amdgpu_ip_block_version gfx_v7_2_ip_block = {
51645159
.type = AMD_IP_BLOCK_TYPE_GFX,
51655160
.major = 7,
51665161
.minor = 2,
51675162
.rev = 0,
51685163
.funcs = &gfx_v7_0_ip_funcs,
51695164
};
51705165

5171-
const struct amdgpu_ip_block_version gfx_v7_3_ip_block =
5172-
{
5166+
const struct amdgpu_ip_block_version gfx_v7_3_ip_block = {
51735167
.type = AMD_IP_BLOCK_TYPE_GFX,
51745168
.major = 7,
51755169
.minor = 3,

0 commit comments

Comments
 (0)