drm/amd/pm: Clean up errors in smu7_fusion.h
Subsystems (3)
PATCH 1/1 drm/amd/pm: Clean up errors in smu7_fusion.h
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
ERROR: space prohibited before open square bracket '['
Signed-off-by Ran Sun <[email protected]>
--- .../drm/amd/pm/powerplay/inc/smu7_fusion.h | 42 +++++++------------ 1 file changed, 16 insertions(+), 26 deletions(-)
drivers/gpu/drm/amd/pm/powerplay/inc/smu7_fusion.h +16 -26
@@ -36,8 +36,7 @@#define SMU7_NUM_NON_TES 2// All 'soft registers' should be uint32_t. -struct SMU7_SoftRegisters -{ +struct SMU7_SoftRegisters {uint32_t RefClockFrequency;uint32_t PmTimerP;uint32_t FeatureEnables;
@@ -80,8 +79,7 @@ struct SMU7_SoftRegisterstypedef struct SMU7_SoftRegisters SMU7_SoftRegisters ; -struct SMU7_Fusion_GraphicsLevel -{ +struct SMU7_Fusion_GraphicsLevel {uint32_t MinVddNb;uint32_t SclkFrequency;
@@ -111,8 +109,7 @@ struct SMU7_Fusion_GraphicsLeveltypedef struct SMU7_Fusion_GraphicsLevel SMU7_Fusion_GraphicsLevel ; -struct SMU7_Fusion_GIOLevel -{ +struct SMU7_Fusion_GIOLevel {uint8_t EnabledForActivity;uint8_t LclkDid;uint8_t Vid;
@@ -137,8 +134,7 @@ struct SMU7_Fusion_GIOLeveltypedef struct SMU7_Fusion_GIOLevel SMU7_Fusion_GIOLevel ;// UVD VCLK/DCLK state (level) definition. -struct SMU7_Fusion_UvdLevel -{ +struct SMU7_Fusion_UvdLevel {uint32_t VclkFrequency;uint32_t DclkFrequency;uint16_t MinVddNb;
@@ -155,8 +151,7 @@ struct SMU7_Fusion_UvdLeveltypedef struct SMU7_Fusion_UvdLevel SMU7_Fusion_UvdLevel ;// Clocks for other external blocks (VCE, ACP, SAMU). -struct SMU7_Fusion_ExtClkLevel -{ +struct SMU7_Fusion_ExtClkLevel {uint32_t Frequency;uint16_t MinVoltage;uint8_t Divider;
@@ -166,8 +161,7 @@ struct SMU7_Fusion_ExtClkLevel };typedef struct SMU7_Fusion_ExtClkLevel SMU7_Fusion_ExtClkLevel ; -struct SMU7_Fusion_ACPILevel -{ +struct SMU7_Fusion_ACPILevel {uint32_t Flags;uint32_t MinVddNb;uint32_t SclkFrequency;
@@ -181,8 +175,7 @@ struct SMU7_Fusion_ACPILeveltypedef struct SMU7_Fusion_ACPILevel SMU7_Fusion_ACPILevel ; -struct SMU7_Fusion_NbDpm -{ +struct SMU7_Fusion_NbDpm {uint8_t DpmXNbPsHi;uint8_t DpmXNbPsLo;uint8_t Dpm0PgNbPsHi;
@@ -197,8 +190,7 @@ struct SMU7_Fusion_NbDpmtypedef struct SMU7_Fusion_NbDpm SMU7_Fusion_NbDpm ; -struct SMU7_Fusion_StateInfo -{ +struct SMU7_Fusion_StateInfo {uint32_t SclkFrequency;uint32_t LclkFrequency;uint32_t VclkFrequency;
@@ -214,8 +206,7 @@ struct SMU7_Fusion_StateInfotypedef struct SMU7_Fusion_StateInfo SMU7_Fusion_StateInfo ; -struct SMU7_Fusion_DpmTable -{ +struct SMU7_Fusion_DpmTable {uint32_t SystemFlags;SMU7_PIDController GraphicsPIDController;
@@ -230,12 +221,12 @@ struct SMU7_Fusion_DpmTableuint8_t SamuLevelCount;uint16_t FpsHighT; -SMU7_Fusion_GraphicsLevel GraphicsLevel [SMU__NUM_SCLK_DPM_STATE ]; +SMU7_Fusion_GraphicsLevel GraphicsLevel[SMU__NUM_SCLK_DPM_STATE ];SMU7_Fusion_ACPILevel ACPILevel; -SMU7_Fusion_UvdLevel UvdLevel [SMU7_MAX_LEVELS_UVD ]; -SMU7_Fusion_ExtClkLevel VceLevel [SMU7_MAX_LEVELS_VCE ]; -SMU7_Fusion_ExtClkLevel AcpLevel [SMU7_MAX_LEVELS_ACP ]; -SMU7_Fusion_ExtClkLevel SamuLevel [SMU7_MAX_LEVELS_SAMU ]; +SMU7_Fusion_UvdLevel UvdLevel[SMU7_MAX_LEVELS_UVD ]; +SMU7_Fusion_ExtClkLevel VceLevel[SMU7_MAX_LEVELS_VCE ]; +SMU7_Fusion_ExtClkLevel AcpLevel[SMU7_MAX_LEVELS_ACP ]; +SMU7_Fusion_ExtClkLevel SamuLevel[SMU7_MAX_LEVELS_SAMU ];uint8_t UvdBootLevel;uint8_t VceBootLevel;
@@ -266,10 +257,9 @@ struct SMU7_Fusion_DpmTable }; -struct SMU7_Fusion_GIODpmTable -{ +struct SMU7_Fusion_GIODpmTable { -SMU7_Fusion_GIOLevel GIOLevel [SMU7_MAX_LEVELS_GIO ]; +SMU7_Fusion_GIOLevel GIOLevel[SMU7_MAX_LEVELS_GIO ];SMU7_PIDController GioPIDController;
Signature · 1 line
2.17.1
Alex Deucher
AppliedApplied. Thanks!
Quoted 139 lines · Ran Sun
Fix the following errors reported by checkpatch:
ERROR: open brace '{' following struct go on the same line
ERROR: space prohibited before open square bracket '['Signed-off-by Ran Sun <[email protected]>--- .../drm/amd/pm/powerplay/inc/smu7_fusion.h | 42 +++++++------------ 1 file changed, 16 insertions(+), 26 deletions(-)drivers/gpu/drm/amd/pm/powerplay/inc/smu7_fusion.h +16
-27@@ -36,8 +36,7 @@#define SMU7_NUM_NON_TES 2// All 'soft registers' should be uint32_t. -struct SMU7_SoftRegisters -{ +struct SMU7_SoftRegisters {uint32_t RefClockFrequency;uint32_t PmTimerP;uint32_t FeatureEnables;@@ -80,8 +79,7 @@ struct SMU7_SoftRegisterstypedef struct SMU7_SoftRegisters SMU7_SoftRegisters ; -struct SMU7_Fusion_GraphicsLevel -{ +struct SMU7_Fusion_GraphicsLevel {uint32_t MinVddNb;uint32_t SclkFrequency;@@ -111,8 +109,7 @@ struct SMU7_Fusion_GraphicsLeveltypedef struct SMU7_Fusion_GraphicsLevel SMU7_Fusion_GraphicsLevel ; -struct SMU7_Fusion_GIOLevel -{ +struct SMU7_Fusion_GIOLevel {uint8_t EnabledForActivity;uint8_t LclkDid;uint8_t Vid;@@ -137,8 +134,7 @@ struct SMU7_Fusion_GIOLeveltypedef struct SMU7_Fusion_GIOLevel SMU7_Fusion_GIOLevel ;// UVD VCLK/DCLK state (level) definition. -struct SMU7_Fusion_UvdLevel -{ +struct SMU7_Fusion_UvdLevel {uint32_t VclkFrequency;uint32_t DclkFrequency;uint16_t MinVddNb;@@ -155,8 +151,7 @@ struct SMU7_Fusion_UvdLeveltypedef struct SMU7_Fusion_UvdLevel SMU7_Fusion_UvdLevel ;// Clocks for other external blocks (VCE, ACP, SAMU). -struct SMU7_Fusion_ExtClkLevel -{ +struct SMU7_Fusion_ExtClkLevel {uint32_t Frequency;uint16_t MinVoltage;uint8_t Divider;@@ -166,8 +161,7 @@ struct SMU7_Fusion_ExtClkLevel };typedef struct SMU7_Fusion_ExtClkLevel SMU7_Fusion_ExtClkLevel ; -struct SMU7_Fusion_ACPILevel -{ +struct SMU7_Fusion_ACPILevel {uint32_t Flags;uint32_t MinVddNb;uint32_t SclkFrequency;@@ -181,8 +175,7 @@ struct SMU7_Fusion_ACPILeveltypedef struct SMU7_Fusion_ACPILevel SMU7_Fusion_ACPILevel ; -struct SMU7_Fusion_NbDpm -{ +struct SMU7_Fusion_NbDpm {uint8_t DpmXNbPsHi;uint8_t DpmXNbPsLo;uint8_t Dpm0PgNbPsHi;@@ -197,8 +190,7 @@ struct SMU7_Fusion_NbDpmtypedef struct SMU7_Fusion_NbDpm SMU7_Fusion_NbDpm ; -struct SMU7_Fusion_StateInfo -{ +struct SMU7_Fusion_StateInfo {uint32_t SclkFrequency;uint32_t LclkFrequency;uint32_t VclkFrequency;@@ -214,8 +206,7 @@ struct SMU7_Fusion_StateInfotypedef struct SMU7_Fusion_StateInfo SMU7_Fusion_StateInfo ; -struct SMU7_Fusion_DpmTable -{ +struct SMU7_Fusion_DpmTable {uint32_t SystemFlags;SMU7_PIDController GraphicsPIDController;@@ -230,12 +221,12 @@ struct SMU7_Fusion_DpmTableuint8_t SamuLevelCount;uint16_t FpsHighT; -SMU7_Fusion_GraphicsLevel GraphicsLevel [SMU__NUM_SCLK_DPM_STATE ]; +SMU7_Fusion_GraphicsLevel GraphicsLevel[SMU__NUM_SCLK_DPM_STATE ];SMU7_Fusion_ACPILevel ACPILevel; -SMU7_Fusion_UvdLevel UvdLevel [SMU7_MAX_LEVELS_UVD ]; -SMU7_Fusion_ExtClkLevel VceLevel [SMU7_MAX_LEVELS_VCE ]; -SMU7_Fusion_ExtClkLevel AcpLevel [SMU7_MAX_LEVELS_ACP ]; -SMU7_Fusion_ExtClkLevel SamuLevel [SMU7_MAX_LEVELS_SAMU ]; +SMU7_Fusion_UvdLevel UvdLevel[SMU7_MAX_LEVELS_UVD ]; +SMU7_Fusion_ExtClkLevel VceLevel[SMU7_MAX_LEVELS_VCE ]; +SMU7_Fusion_ExtClkLevel AcpLevel[SMU7_MAX_LEVELS_ACP ]; +SMU7_Fusion_ExtClkLevel SamuLevel[SMU7_MAX_LEVELS_SAMU ];uint8_t UvdBootLevel;uint8_t VceBootLevel;@@ -266,10 +257,9 @@ struct SMU7_Fusion_DpmTable }; -struct SMU7_Fusion_GIODpmTable -{ +struct SMU7_Fusion_GIODpmTable { -SMU7_Fusion_GIOLevel GIOLevel [SMU7_MAX_LEVELS_GIO ]; +SMU7_Fusion_GIOLevel GIOLevel[SMU7_MAX_LEVELS_GIO ];SMU7_PIDController GioPIDController; --2.17.1