Skip to content

Commit b029753

Browse files
Ran Sunalexdeucher
authored andcommitted
drm/amd/pm: Clean up errors in smu73_discrete.h
Fix the following errors reported by checkpatch: ERROR: open brace '{' following struct go on the same line ERROR: trailing whitespace ERROR: space prohibited before open square bracket '[' Signed-off-by: Ran Sun <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 20c7435 commit b029753

File tree

1 file changed

+29
-44
lines changed

1 file changed

+29
-44
lines changed

drivers/gpu/drm/amd/pm/powerplay/inc/smu73_discrete.h

Lines changed: 29 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,15 @@
2727

2828
#pragma pack(push, 1)
2929

30-
struct SMIO_Pattern
31-
{
30+
struct SMIO_Pattern {
3231
uint16_t Voltage;
3332
uint8_t Smio;
3433
uint8_t padding;
3534
};
3635

3736
typedef struct SMIO_Pattern SMIO_Pattern;
3837

39-
struct SMIO_Table
40-
{
38+
struct SMIO_Table {
4139
SMIO_Pattern Pattern[SMU_MAX_SMIO_LEVELS];
4240
};
4341

@@ -100,8 +98,7 @@ struct SMU73_Discrete_Ulv {
10098

10199
typedef struct SMU73_Discrete_Ulv SMU73_Discrete_Ulv;
102100

103-
struct SMU73_Discrete_MemoryLevel
104-
{
101+
struct SMU73_Discrete_MemoryLevel {
105102
uint32_t MinVoltage;
106103
uint32_t MinMvdd;
107104

@@ -124,10 +121,9 @@ struct SMU73_Discrete_MemoryLevel
124121

125122
typedef struct SMU73_Discrete_MemoryLevel SMU73_Discrete_MemoryLevel;
126123

127-
struct SMU73_Discrete_LinkLevel
128-
{
124+
struct SMU73_Discrete_LinkLevel {
129125
uint8_t PcieGenSpeed; ///< 0:PciE-gen1 1:PciE-gen2 2:PciE-gen3
130-
uint8_t PcieLaneCount; ///< 1=x1, 2=x2, 3=x4, 4=x8, 5=x12, 6=x16
126+
uint8_t PcieLaneCount; ///< 1=x1, 2=x2, 3=x4, 4=x8, 5=x12, 6=x16
131127
uint8_t EnabledForActivity;
132128
uint8_t SPC;
133129
uint32_t DownThreshold;
@@ -139,8 +135,7 @@ typedef struct SMU73_Discrete_LinkLevel SMU73_Discrete_LinkLevel;
139135

140136

141137
// MC ARB DRAM Timing registers.
142-
struct SMU73_Discrete_MCArbDramTimingTableEntry
143-
{
138+
struct SMU73_Discrete_MCArbDramTimingTableEntry {
144139
uint32_t McArbDramTiming;
145140
uint32_t McArbDramTiming2;
146141
uint8_t McArbBurstTime;
@@ -151,16 +146,14 @@ struct SMU73_Discrete_MCArbDramTimingTableEntry
151146

152147
typedef struct SMU73_Discrete_MCArbDramTimingTableEntry SMU73_Discrete_MCArbDramTimingTableEntry;
153148

154-
struct SMU73_Discrete_MCArbDramTimingTable
155-
{
149+
struct SMU73_Discrete_MCArbDramTimingTable {
156150
SMU73_Discrete_MCArbDramTimingTableEntry entries[SMU__NUM_SCLK_DPM_STATE][SMU__NUM_MCLK_DPM_LEVELS];
157151
};
158152

159153
typedef struct SMU73_Discrete_MCArbDramTimingTable SMU73_Discrete_MCArbDramTimingTable;
160154

161155
// UVD VCLK/DCLK state (level) definition.
162-
struct SMU73_Discrete_UvdLevel
163-
{
156+
struct SMU73_Discrete_UvdLevel {
164157
uint32_t VclkFrequency;
165158
uint32_t DclkFrequency;
166159
uint32_t MinVoltage;
@@ -172,8 +165,7 @@ struct SMU73_Discrete_UvdLevel
172165
typedef struct SMU73_Discrete_UvdLevel SMU73_Discrete_UvdLevel;
173166

174167
// Clocks for other external blocks (VCE, ACP, SAMU).
175-
struct SMU73_Discrete_ExtClkLevel
176-
{
168+
struct SMU73_Discrete_ExtClkLevel {
177169
uint32_t Frequency;
178170
uint32_t MinVoltage;
179171
uint8_t Divider;
@@ -182,8 +174,7 @@ struct SMU73_Discrete_ExtClkLevel
182174

183175
typedef struct SMU73_Discrete_ExtClkLevel SMU73_Discrete_ExtClkLevel;
184176

185-
struct SMU73_Discrete_StateInfo
186-
{
177+
struct SMU73_Discrete_StateInfo {
187178
uint32_t SclkFrequency;
188179
uint32_t MclkFrequency;
189180
uint32_t VclkFrequency;
@@ -206,8 +197,7 @@ struct SMU73_Discrete_StateInfo
206197

207198
typedef struct SMU73_Discrete_StateInfo SMU73_Discrete_StateInfo;
208199

209-
struct SMU73_Discrete_DpmTable
210-
{
200+
struct SMU73_Discrete_DpmTable {
211201
// Multi-DPM controller settings
212202
SMU73_PIDController GraphicsPIDController;
213203
SMU73_PIDController MemoryPIDController;
@@ -225,9 +215,9 @@ struct SMU73_Discrete_DpmTable
225215
uint32_t MvddLevelCount;
226216

227217

228-
uint8_t BapmVddcVidHiSidd [SMU73_MAX_LEVELS_VDDC];
229-
uint8_t BapmVddcVidLoSidd [SMU73_MAX_LEVELS_VDDC];
230-
uint8_t BapmVddcVidHiSidd2 [SMU73_MAX_LEVELS_VDDC];
218+
uint8_t BapmVddcVidHiSidd[SMU73_MAX_LEVELS_VDDC];
219+
uint8_t BapmVddcVidLoSidd[SMU73_MAX_LEVELS_VDDC];
220+
uint8_t BapmVddcVidHiSidd2[SMU73_MAX_LEVELS_VDDC];
231221

232222
uint8_t GraphicsDpmLevelCount;
233223
uint8_t MemoryDpmLevelCount;
@@ -246,19 +236,19 @@ struct SMU73_Discrete_DpmTable
246236
uint32_t Reserved[4];
247237

248238
// State table entries for each DPM state
249-
SMU73_Discrete_GraphicsLevel GraphicsLevel [SMU73_MAX_LEVELS_GRAPHICS];
239+
SMU73_Discrete_GraphicsLevel GraphicsLevel[SMU73_MAX_LEVELS_GRAPHICS];
250240
SMU73_Discrete_MemoryLevel MemoryACPILevel;
251-
SMU73_Discrete_MemoryLevel MemoryLevel [SMU73_MAX_LEVELS_MEMORY];
252-
SMU73_Discrete_LinkLevel LinkLevel [SMU73_MAX_LEVELS_LINK];
241+
SMU73_Discrete_MemoryLevel MemoryLevel[SMU73_MAX_LEVELS_MEMORY];
242+
SMU73_Discrete_LinkLevel LinkLevel[SMU73_MAX_LEVELS_LINK];
253243
SMU73_Discrete_ACPILevel ACPILevel;
254-
SMU73_Discrete_UvdLevel UvdLevel [SMU73_MAX_LEVELS_UVD];
255-
SMU73_Discrete_ExtClkLevel VceLevel [SMU73_MAX_LEVELS_VCE];
256-
SMU73_Discrete_ExtClkLevel AcpLevel [SMU73_MAX_LEVELS_ACP];
257-
SMU73_Discrete_ExtClkLevel SamuLevel [SMU73_MAX_LEVELS_SAMU];
244+
SMU73_Discrete_UvdLevel UvdLevel[SMU73_MAX_LEVELS_UVD];
245+
SMU73_Discrete_ExtClkLevel VceLevel[SMU73_MAX_LEVELS_VCE];
246+
SMU73_Discrete_ExtClkLevel AcpLevel[SMU73_MAX_LEVELS_ACP];
247+
SMU73_Discrete_ExtClkLevel SamuLevel[SMU73_MAX_LEVELS_SAMU];
258248
SMU73_Discrete_Ulv Ulv;
259249

260250
uint32_t SclkStepSize;
261-
uint32_t Smio [SMU73_MAX_ENTRIES_SMIO];
251+
uint32_t Smio[SMU73_MAX_ENTRIES_SMIO];
262252

263253
uint8_t UvdBootLevel;
264254
uint8_t VceBootLevel;
@@ -368,8 +358,7 @@ typedef struct SMU73_Discrete_DpmTable SMU73_Discrete_DpmTable;
368358

369359

370360
// --------------------------------------------------- Fan Table -----------------------------------------------------------
371-
struct SMU73_Discrete_FanTable
372-
{
361+
struct SMU73_Discrete_FanTable {
373362
uint16_t FdoMode;
374363
int16_t TempMin;
375364
int16_t TempMed;
@@ -397,8 +386,7 @@ typedef struct SMU73_Discrete_FanTable SMU73_Discrete_FanTable;
397386

398387

399388

400-
struct SMU7_MclkDpmScoreboard
401-
{
389+
struct SMU7_MclkDpmScoreboard {
402390

403391
uint32_t PercentageBusy;
404392

@@ -448,8 +436,8 @@ struct SMU7_MclkDpmScoreboard
448436
uint8_t VbiWaitCounter;
449437
uint8_t EnabledLevelsChange;
450438

451-
uint16_t LevelResidencyCounters [SMU73_MAX_LEVELS_MEMORY];
452-
uint16_t LevelSwitchCounters [SMU73_MAX_LEVELS_MEMORY];
439+
uint16_t LevelResidencyCounters[SMU73_MAX_LEVELS_MEMORY];
440+
uint16_t LevelSwitchCounters[SMU73_MAX_LEVELS_MEMORY];
453441

454442
void (*TargetStateCalculator)(uint8_t);
455443
void (*SavedTargetStateCalculator)(uint8_t);
@@ -469,8 +457,7 @@ struct SMU7_MclkDpmScoreboard
469457

470458
typedef struct SMU7_MclkDpmScoreboard SMU7_MclkDpmScoreboard;
471459

472-
struct SMU7_UlvScoreboard
473-
{
460+
struct SMU7_UlvScoreboard {
474461
uint8_t EnterUlv;
475462
uint8_t ExitUlv;
476463
uint8_t UlvActive;
@@ -485,8 +472,7 @@ struct SMU7_UlvScoreboard
485472

486473
typedef struct SMU7_UlvScoreboard SMU7_UlvScoreboard;
487474

488-
struct VddgfxSavedRegisters
489-
{
475+
struct VddgfxSavedRegisters {
490476
uint32_t GPU_DBG[3];
491477
uint32_t MEC_BaseAddress_Hi;
492478
uint32_t MEC_BaseAddress_Lo;
@@ -497,8 +483,7 @@ struct VddgfxSavedRegisters
497483

498484
typedef struct VddgfxSavedRegisters VddgfxSavedRegisters;
499485

500-
struct SMU7_VddGfxScoreboard
501-
{
486+
struct SMU7_VddGfxScoreboard {
502487
uint8_t VddGfxEnable;
503488
uint8_t VddGfxActive;
504489
uint8_t VPUResetOccured;

0 commit comments

Comments
 (0)