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

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

Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line
ERROR: space required before the open parenthesis '('
ERROR: spaces required around that '+=' (ctx:VxV)
ERROR: spaces required around that '=' (ctx:VxW)

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
3013edd6 1b5a5e40

+31 -59
+31 -59
drivers/gpu/drm/radeon/btc_dpm.c
··· 53 53 extern int ni_mc_load_microcode(struct radeon_device *rdev); 54 54 55 55 //********* BARTS **************// 56 - static const u32 barts_cgcg_cgls_default[] = 57 - { 56 + static const u32 barts_cgcg_cgls_default[] = { 58 57 /* Register, Value, Mask bits */ 59 58 0x000008f8, 0x00000010, 0xffffffff, 60 59 0x000008fc, 0x00000000, 0xffffffff, ··· 106 107 }; 107 108 #define BARTS_CGCG_CGLS_DEFAULT_LENGTH sizeof(barts_cgcg_cgls_default) / (3 * sizeof(u32)) 108 109 109 - static const u32 barts_cgcg_cgls_disable[] = 110 - { 110 + static const u32 barts_cgcg_cgls_disable[] = { 111 111 0x000008f8, 0x00000010, 0xffffffff, 112 112 0x000008fc, 0xffffffff, 0xffffffff, 113 113 0x000008f8, 0x00000011, 0xffffffff, ··· 160 162 }; 161 163 #define BARTS_CGCG_CGLS_DISABLE_LENGTH sizeof(barts_cgcg_cgls_disable) / (3 * sizeof(u32)) 162 164 163 - static const u32 barts_cgcg_cgls_enable[] = 164 - { 165 + static const u32 barts_cgcg_cgls_enable[] = { 165 166 /* 0x0000c124, 0x84180000, 0x00180000, */ 166 167 0x00000644, 0x000f7892, 0x001f4080, 167 168 0x000008f8, 0x00000010, 0xffffffff, ··· 214 217 }; 215 218 #define BARTS_CGCG_CGLS_ENABLE_LENGTH sizeof(barts_cgcg_cgls_enable) / (3 * sizeof(u32)) 216 219 217 - static const u32 barts_mgcg_default[] = 218 - { 220 + static const u32 barts_mgcg_default[] = { 219 221 0x0000802c, 0xc0000000, 0xffffffff, 220 222 0x00005448, 0x00000100, 0xffffffff, 221 223 0x000055e4, 0x00600100, 0xffffffff, ··· 362 366 }; 363 367 #define BARTS_MGCG_DEFAULT_LENGTH sizeof(barts_mgcg_default) / (3 * sizeof(u32)) 364 368 365 - static const u32 barts_mgcg_disable[] = 366 - { 369 + static const u32 barts_mgcg_disable[] = { 367 370 0x0000802c, 0xc0000000, 0xffffffff, 368 371 0x000008f8, 0x00000000, 0xffffffff, 369 372 0x000008fc, 0xffffffff, 0xffffffff, ··· 376 381 }; 377 382 #define BARTS_MGCG_DISABLE_LENGTH sizeof(barts_mgcg_disable) / (3 * sizeof(u32)) 378 383 379 - static const u32 barts_mgcg_enable[] = 380 - { 384 + static const u32 barts_mgcg_enable[] = { 381 385 0x0000802c, 0xc0000000, 0xffffffff, 382 386 0x000008f8, 0x00000000, 0xffffffff, 383 387 0x000008fc, 0x00000000, 0xffffffff, ··· 391 397 #define BARTS_MGCG_ENABLE_LENGTH sizeof(barts_mgcg_enable) / (3 * sizeof(u32)) 392 398 393 399 //********* CAICOS **************// 394 - static const u32 caicos_cgcg_cgls_default[] = 395 - { 400 + static const u32 caicos_cgcg_cgls_default[] = { 396 401 0x000008f8, 0x00000010, 0xffffffff, 397 402 0x000008fc, 0x00000000, 0xffffffff, 398 403 0x000008f8, 0x00000011, 0xffffffff, ··· 443 450 }; 444 451 #define CAICOS_CGCG_CGLS_DEFAULT_LENGTH sizeof(caicos_cgcg_cgls_default) / (3 * sizeof(u32)) 445 452 446 - static const u32 caicos_cgcg_cgls_disable[] = 447 - { 453 + static const u32 caicos_cgcg_cgls_disable[] = { 448 454 0x000008f8, 0x00000010, 0xffffffff, 449 455 0x000008fc, 0xffffffff, 0xffffffff, 450 456 0x000008f8, 0x00000011, 0xffffffff, ··· 497 505 }; 498 506 #define CAICOS_CGCG_CGLS_DISABLE_LENGTH sizeof(caicos_cgcg_cgls_disable) / (3 * sizeof(u32)) 499 507 500 - static const u32 caicos_cgcg_cgls_enable[] = 501 - { 508 + static const u32 caicos_cgcg_cgls_enable[] = { 502 509 /* 0x0000c124, 0x84180000, 0x00180000, */ 503 510 0x00000644, 0x000f7892, 0x001f4080, 504 511 0x000008f8, 0x00000010, 0xffffffff, ··· 551 560 }; 552 561 #define CAICOS_CGCG_CGLS_ENABLE_LENGTH sizeof(caicos_cgcg_cgls_enable) / (3 * sizeof(u32)) 553 562 554 - static const u32 caicos_mgcg_default[] = 555 - { 563 + static const u32 caicos_mgcg_default[] = { 556 564 0x0000802c, 0xc0000000, 0xffffffff, 557 565 0x00005448, 0x00000100, 0xffffffff, 558 566 0x000055e4, 0x00600100, 0xffffffff, ··· 630 640 }; 631 641 #define CAICOS_MGCG_DEFAULT_LENGTH sizeof(caicos_mgcg_default) / (3 * sizeof(u32)) 632 642 633 - static const u32 caicos_mgcg_disable[] = 634 - { 643 + static const u32 caicos_mgcg_disable[] = { 635 644 0x0000802c, 0xc0000000, 0xffffffff, 636 645 0x000008f8, 0x00000000, 0xffffffff, 637 646 0x000008fc, 0xffffffff, 0xffffffff, ··· 644 655 }; 645 656 #define CAICOS_MGCG_DISABLE_LENGTH sizeof(caicos_mgcg_disable) / (3 * sizeof(u32)) 646 657 647 - static const u32 caicos_mgcg_enable[] = 648 - { 658 + static const u32 caicos_mgcg_enable[] = { 649 659 0x0000802c, 0xc0000000, 0xffffffff, 650 660 0x000008f8, 0x00000000, 0xffffffff, 651 661 0x000008fc, 0x00000000, 0xffffffff, ··· 659 671 #define CAICOS_MGCG_ENABLE_LENGTH sizeof(caicos_mgcg_enable) / (3 * sizeof(u32)) 660 672 661 673 //********* TURKS **************// 662 - static const u32 turks_cgcg_cgls_default[] = 663 - { 674 + static const u32 turks_cgcg_cgls_default[] = { 664 675 0x000008f8, 0x00000010, 0xffffffff, 665 676 0x000008fc, 0x00000000, 0xffffffff, 666 677 0x000008f8, 0x00000011, 0xffffffff, ··· 711 724 }; 712 725 #define TURKS_CGCG_CGLS_DEFAULT_LENGTH sizeof(turks_cgcg_cgls_default) / (3 * sizeof(u32)) 713 726 714 - static const u32 turks_cgcg_cgls_disable[] = 715 - { 727 + static const u32 turks_cgcg_cgls_disable[] = { 716 728 0x000008f8, 0x00000010, 0xffffffff, 717 729 0x000008fc, 0xffffffff, 0xffffffff, 718 730 0x000008f8, 0x00000011, 0xffffffff, ··· 765 779 }; 766 780 #define TURKS_CGCG_CGLS_DISABLE_LENGTH sizeof(turks_cgcg_cgls_disable) / (3 * sizeof(u32)) 767 781 768 - static const u32 turks_cgcg_cgls_enable[] = 769 - { 782 + static const u32 turks_cgcg_cgls_enable[] = { 770 783 /* 0x0000c124, 0x84180000, 0x00180000, */ 771 784 0x00000644, 0x000f7892, 0x001f4080, 772 785 0x000008f8, 0x00000010, 0xffffffff, ··· 820 835 #define TURKS_CGCG_CGLS_ENABLE_LENGTH sizeof(turks_cgcg_cgls_enable) / (3 * sizeof(u32)) 821 836 822 837 // These are the sequences for turks_mgcg_shls 823 - static const u32 turks_mgcg_default[] = 824 - { 838 + static const u32 turks_mgcg_default[] = { 825 839 0x0000802c, 0xc0000000, 0xffffffff, 826 840 0x00005448, 0x00000100, 0xffffffff, 827 841 0x000055e4, 0x00600100, 0xffffffff, ··· 919 935 }; 920 936 #define TURKS_MGCG_DEFAULT_LENGTH sizeof(turks_mgcg_default) / (3 * sizeof(u32)) 921 937 922 - static const u32 turks_mgcg_disable[] = 923 - { 938 + static const u32 turks_mgcg_disable[] = { 924 939 0x0000802c, 0xc0000000, 0xffffffff, 925 940 0x000008f8, 0x00000000, 0xffffffff, 926 941 0x000008fc, 0xffffffff, 0xffffffff, ··· 933 950 }; 934 951 #define TURKS_MGCG_DISABLE_LENGTH sizeof(turks_mgcg_disable) / (3 * sizeof(u32)) 935 952 936 - static const u32 turks_mgcg_enable[] = 937 - { 953 + static const u32 turks_mgcg_enable[] = { 938 954 0x0000802c, 0xc0000000, 0xffffffff, 939 955 0x000008f8, 0x00000000, 0xffffffff, 940 956 0x000008fc, 0x00000000, 0xffffffff, ··· 954 972 955 973 956 974 //********* BARTS **************// 957 - static const u32 barts_sysls_default[] = 958 - { 975 + static const u32 barts_sysls_default[] = { 959 976 /* Register, Value, Mask bits */ 960 977 0x000055e8, 0x00000000, 0xffffffff, 961 978 0x0000d0bc, 0x00000000, 0xffffffff, ··· 974 993 }; 975 994 #define BARTS_SYSLS_DEFAULT_LENGTH sizeof(barts_sysls_default) / (3 * sizeof(u32)) 976 995 977 - static const u32 barts_sysls_disable[] = 978 - { 996 + static const u32 barts_sysls_disable[] = { 979 997 0x000055e8, 0x00000000, 0xffffffff, 980 998 0x0000d0bc, 0x00000000, 0xffffffff, 981 999 0x000015c0, 0x00041401, 0xffffffff, ··· 993 1013 }; 994 1014 #define BARTS_SYSLS_DISABLE_LENGTH sizeof(barts_sysls_disable) / (3 * sizeof(u32)) 995 1015 996 - static const u32 barts_sysls_enable[] = 997 - { 1016 + static const u32 barts_sysls_enable[] = { 998 1017 0x000055e8, 0x00000001, 0xffffffff, 999 1018 0x0000d0bc, 0x00000100, 0xffffffff, 1000 1019 0x000015c0, 0x000c1401, 0xffffffff, ··· 1013 1034 #define BARTS_SYSLS_ENABLE_LENGTH sizeof(barts_sysls_enable) / (3 * sizeof(u32)) 1014 1035 1015 1036 //********* CAICOS **************// 1016 - static const u32 caicos_sysls_default[] = 1017 - { 1037 + static const u32 caicos_sysls_default[] = { 1018 1038 0x000055e8, 0x00000000, 0xffffffff, 1019 1039 0x0000d0bc, 0x00000000, 0xffffffff, 1020 1040 0x000015c0, 0x000c1401, 0xffffffff, ··· 1031 1053 }; 1032 1054 #define CAICOS_SYSLS_DEFAULT_LENGTH sizeof(caicos_sysls_default) / (3 * sizeof(u32)) 1033 1055 1034 - static const u32 caicos_sysls_disable[] = 1035 - { 1056 + static const u32 caicos_sysls_disable[] = { 1036 1057 0x000055e8, 0x00000000, 0xffffffff, 1037 1058 0x0000d0bc, 0x00000000, 0xffffffff, 1038 1059 0x000015c0, 0x00041401, 0xffffffff, ··· 1049 1072 }; 1050 1073 #define CAICOS_SYSLS_DISABLE_LENGTH sizeof(caicos_sysls_disable) / (3 * sizeof(u32)) 1051 1074 1052 - static const u32 caicos_sysls_enable[] = 1053 - { 1075 + static const u32 caicos_sysls_enable[] = { 1054 1076 0x000055e8, 0x00000001, 0xffffffff, 1055 1077 0x0000d0bc, 0x00000100, 0xffffffff, 1056 1078 0x000015c0, 0x000c1401, 0xffffffff, ··· 1068 1092 #define CAICOS_SYSLS_ENABLE_LENGTH sizeof(caicos_sysls_enable) / (3 * sizeof(u32)) 1069 1093 1070 1094 //********* TURKS **************// 1071 - static const u32 turks_sysls_default[] = 1072 - { 1095 + static const u32 turks_sysls_default[] = { 1073 1096 0x000055e8, 0x00000000, 0xffffffff, 1074 1097 0x0000d0bc, 0x00000000, 0xffffffff, 1075 1098 0x000015c0, 0x000c1401, 0xffffffff, ··· 1087 1112 }; 1088 1113 #define TURKS_SYSLS_DEFAULT_LENGTH sizeof(turks_sysls_default) / (3 * sizeof(u32)) 1089 1114 1090 - static const u32 turks_sysls_disable[] = 1091 - { 1115 + static const u32 turks_sysls_disable[] = { 1092 1116 0x000055e8, 0x00000000, 0xffffffff, 1093 1117 0x0000d0bc, 0x00000000, 0xffffffff, 1094 1118 0x000015c0, 0x00041401, 0xffffffff, ··· 1106 1132 }; 1107 1133 #define TURKS_SYSLS_DISABLE_LENGTH sizeof(turks_sysls_disable) / (3 * sizeof(u32)) 1108 1134 1109 - static const u32 turks_sysls_enable[] = 1110 - { 1135 + static const u32 turks_sysls_enable[] = { 1111 1136 0x000055e8, 0x00000001, 0xffffffff, 1112 1137 0x0000d0bc, 0x00000100, 0xffffffff, 1113 1138 0x000015c0, 0x000c1401, 0xffffffff, ··· 1127 1154 1128 1155 #endif 1129 1156 1130 - u32 btc_valid_sclk[40] = 1131 - { 1157 + u32 btc_valid_sclk[40] = { 1132 1158 5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000, 1133 1159 55000, 60000, 65000, 70000, 75000, 80000, 85000, 90000, 95000, 100000, 1134 1160 105000, 110000, 11500, 120000, 125000, 130000, 135000, 140000, 145000, 150000, ··· 1166 1194 if ((table == NULL) || (table->count == 0)) 1167 1195 return; 1168 1196 1169 - for (i= 0; i < table->count; i++) { 1197 + for (i = 0; i < table->count; i++) { 1170 1198 if (clock <= table->entries[i].clk) { 1171 1199 if (*voltage < table->entries[i].v) 1172 1200 *voltage = (u16)((table->entries[i].v < max_voltage) ? ··· 1413 1441 u32 i, length = count * 3; 1414 1442 u32 tmp; 1415 1443 1416 - for (i = 0; i < length; i+=3) { 1444 + for (i = 0; i < length; i += 3) { 1417 1445 tmp = RREG32(sequence[i]); 1418 1446 tmp &= ~sequence[i+2]; 1419 1447 tmp |= sequence[i+1] & sequence[i+2]; ··· 1975 2003 for (i = 0; i < table->num_entries; i++) { 1976 2004 eg_table->mc_reg_table_entry[i].mclk_max = 1977 2005 table->mc_reg_table_entry[i].mclk_max; 1978 - for(j = 0; j < table->last; j++) 2006 + for (j = 0; j < table->last; j++) 1979 2007 eg_table->mc_reg_table_entry[i].mc_data[j] = 1980 2008 table->mc_reg_table_entry[i].mc_data[j]; 1981 2009 }