Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/radeon/ci_dpm: Clean up errors in ci_dpm.c

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line
ERROR: need consistent spacing around '-' (ctx:WxV)
ERROR: space required before the open parenthesis '('
ERROR: "foo* bar" should be "foo *bar"

Signed-off-by: GuoHua Chen <chenguohua_716@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

GuoHua Chen and committed by
Alex Deucher
63373186 cc588e79

+13 -18
+13 -18
drivers/gpu/drm/radeon/ci_dpm.c
··· 46 46 #define VOLTAGE_VID_OFFSET_SCALE1 625 47 47 #define VOLTAGE_VID_OFFSET_SCALE2 100 48 48 49 - static const struct ci_pt_defaults defaults_hawaii_xt = 50 - { 49 + static const struct ci_pt_defaults defaults_hawaii_xt = { 51 50 1, 0xF, 0xFD, 0x19, 5, 0x14, 0, 0xB0000, 52 51 { 0x2E, 0x00, 0x00, 0x88, 0x00, 0x00, 0x72, 0x60, 0x51, 0xA7, 0x79, 0x6B, 0x90, 0xBD, 0x79 }, 53 52 { 0x217, 0x217, 0x217, 0x242, 0x242, 0x242, 0x269, 0x269, 0x269, 0x2A1, 0x2A1, 0x2A1, 0x2C9, 0x2C9, 0x2C9 } 54 53 }; 55 54 56 - static const struct ci_pt_defaults defaults_hawaii_pro = 57 - { 55 + static const struct ci_pt_defaults defaults_hawaii_pro = { 58 56 1, 0xF, 0xFD, 0x19, 5, 0x14, 0, 0x65062, 59 57 { 0x2E, 0x00, 0x00, 0x88, 0x00, 0x00, 0x72, 0x60, 0x51, 0xA7, 0x79, 0x6B, 0x90, 0xBD, 0x79 }, 60 58 { 0x217, 0x217, 0x217, 0x242, 0x242, 0x242, 0x269, 0x269, 0x269, 0x2A1, 0x2A1, 0x2A1, 0x2C9, 0x2C9, 0x2C9 } 61 59 }; 62 60 63 - static const struct ci_pt_defaults defaults_bonaire_xt = 64 - { 61 + static const struct ci_pt_defaults defaults_bonaire_xt = { 65 62 1, 0xF, 0xFD, 0x19, 5, 45, 0, 0xB0000, 66 63 { 0x79, 0x253, 0x25D, 0xAE, 0x72, 0x80, 0x83, 0x86, 0x6F, 0xC8, 0xC9, 0xC9, 0x2F, 0x4D, 0x61 }, 67 64 { 0x17C, 0x172, 0x180, 0x1BC, 0x1B3, 0x1BD, 0x206, 0x200, 0x203, 0x25D, 0x25A, 0x255, 0x2C3, 0x2C5, 0x2B4 } 68 65 }; 69 66 70 - static const struct ci_pt_defaults defaults_saturn_xt = 71 - { 67 + static const struct ci_pt_defaults defaults_saturn_xt = { 72 68 1, 0xF, 0xFD, 0x19, 5, 55, 0, 0x70000, 73 69 { 0x8C, 0x247, 0x249, 0xA6, 0x80, 0x81, 0x8B, 0x89, 0x86, 0xC9, 0xCA, 0xC9, 0x4D, 0x4D, 0x4D }, 74 70 { 0x187, 0x187, 0x187, 0x1C7, 0x1C7, 0x1C7, 0x210, 0x210, 0x210, 0x266, 0x266, 0x266, 0x2C9, 0x2C9, 0x2C9 } 75 71 }; 76 72 77 - static const struct ci_pt_config_reg didt_config_ci[] = 78 - { 73 + static const struct ci_pt_config_reg didt_config_ci[] = { 79 74 { 0x10, 0x000000ff, 0, 0x0, CISLANDS_CONFIGREG_DIDT_IND }, 80 75 { 0x10, 0x0000ff00, 8, 0x0, CISLANDS_CONFIGREG_DIDT_IND }, 81 76 { 0x10, 0x00ff0000, 16, 0x0, CISLANDS_CONFIGREG_DIDT_IND }, ··· 1211 1216 1212 1217 if (rdev->pm.fan_pulses_per_revolution) { 1213 1218 tmp = RREG32_SMC(CG_TACH_CTRL) & ~EDGE_PER_REV_MASK; 1214 - tmp |= EDGE_PER_REV(rdev->pm.fan_pulses_per_revolution -1); 1219 + tmp |= EDGE_PER_REV(rdev->pm.fan_pulses_per_revolution - 1); 1215 1220 WREG32_SMC(CG_TACH_CTRL, tmp); 1216 1221 } 1217 1222 ··· 3328 3333 } 3329 3334 3330 3335 static void ci_reset_single_dpm_table(struct radeon_device *rdev, 3331 - struct ci_single_dpm_table* dpm_table, 3336 + struct ci_single_dpm_table *dpm_table, 3332 3337 u32 count) 3333 3338 { 3334 3339 u32 i; ··· 3338 3343 dpm_table->dpm_levels[i].enabled = false; 3339 3344 } 3340 3345 3341 - static void ci_setup_pcie_table_entry(struct ci_single_dpm_table* dpm_table, 3346 + static void ci_setup_pcie_table_entry(struct ci_single_dpm_table *dpm_table, 3342 3347 u32 index, u32 pcie_gen, u32 pcie_lanes) 3343 3348 { 3344 3349 dpm_table->dpm_levels[index].value = pcie_gen; ··· 3498 3503 u32 i; 3499 3504 int ret = -EINVAL; 3500 3505 3501 - for(i = 0; i < table->count; i++) { 3506 + for (i = 0; i < table->count; i++) { 3502 3507 if (value == table->dpm_levels[i].value) { 3503 3508 *boot_level = i; 3504 3509 ret = 0; ··· 4299 4304 for (i = 0, j = table->last; i < table->last; i++) { 4300 4305 if (j >= SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE) 4301 4306 return -EINVAL; 4302 - switch(table->mc_reg_address[i].s1 << 2) { 4307 + switch (table->mc_reg_address[i].s1 << 2) { 4303 4308 case MC_SEQ_MISC1: 4304 4309 temp_reg = RREG32(MC_PMG_CMD_EMRS); 4305 4310 table->mc_reg_address[j].s1 = MC_PMG_CMD_EMRS >> 2; ··· 4364 4369 { 4365 4370 bool result = true; 4366 4371 4367 - switch(in_reg) { 4372 + switch (in_reg) { 4368 4373 case MC_SEQ_RAS_TIMING >> 2: 4369 4374 *out_reg = MC_SEQ_RAS_TIMING_LP >> 2; 4370 4375 break; ··· 4503 4508 for (i = 0; i < table->last; i++) { 4504 4509 if (table->last >= SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE) 4505 4510 return -EINVAL; 4506 - switch(table->mc_reg_address[i].s1 >> 2) { 4511 + switch (table->mc_reg_address[i].s1 >> 2) { 4507 4512 case MC_SEQ_MISC1: 4508 4513 for (k = 0; k < table->num_entries; k++) { 4509 4514 if ((table->mc_reg_table_entry[k].mclk_max == 125000) || ··· 4678 4683 struct ci_power_info *pi = ci_get_pi(rdev); 4679 4684 u32 i = 0; 4680 4685 4681 - for(i = 0; i < pi->mc_reg_table.num_entries; i++) { 4686 + for (i = 0; i < pi->mc_reg_table.num_entries; i++) { 4682 4687 if (memory_clock <= pi->mc_reg_table.mc_reg_table_entry[i].mclk_max) 4683 4688 break; 4684 4689 }