2023-08-01 06:24:25

by Ran Sun

[permalink] [raw]
Subject: [PATCH] drm/amd/pm: Clean up errors in vega12_pptable.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]>
---
.../gpu/drm/amd/pm/powerplay/hwmgr/vega12_pptable.h | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_pptable.h b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_pptable.h
index bf4f5095b80d..9b8435a4d306 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_pptable.h
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_pptable.h
@@ -72,8 +72,7 @@ enum ATOM_VEGA12_PPCLOCK_ID {
typedef enum ATOM_VEGA12_PPCLOCK_ID ATOM_VEGA12_PPCLOCK_ID;


-typedef struct _ATOM_VEGA12_POWERPLAYTABLE
-{
+typedef struct _ATOM_VEGA12_POWERPLAYTABLE {
struct atom_common_table_header sHeader;
UCHAR ucTableRevision;
USHORT usTableSize;
@@ -92,11 +91,11 @@ typedef struct _ATOM_VEGA12_POWERPLAYTABLE
USHORT usODPowerSavePowerLimit;
USHORT usSoftwareShutdownTemp;

- ULONG PowerSavingClockMax [ATOM_VEGA12_PPCLOCK_COUNT];
- ULONG PowerSavingClockMin [ATOM_VEGA12_PPCLOCK_COUNT];
+ ULONG PowerSavingClockMax[ATOM_VEGA12_PPCLOCK_COUNT];
+ ULONG PowerSavingClockMin[ATOM_VEGA12_PPCLOCK_COUNT];

- ULONG ODSettingsMax [ATOM_VEGA12_ODSETTING_COUNT];
- ULONG ODSettingsMin [ATOM_VEGA12_ODSETTING_COUNT];
+ ULONG ODSettingsMax[ATOM_VEGA12_ODSETTING_COUNT];
+ ULONG ODSettingsMin[ATOM_VEGA12_ODSETTING_COUNT];

USHORT usReserve[5];

--
2.17.1



2023-08-07 18:39:12

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH] drm/amd/pm: Clean up errors in vega12_pptable.h

Applied. Thanks!

On Tue, Aug 1, 2023 at 2:04 AM Ran Sun <[email protected]> wrote:
>
> 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]>
> ---
> .../gpu/drm/amd/pm/powerplay/hwmgr/vega12_pptable.h | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_pptable.h b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_pptable.h
> index bf4f5095b80d..9b8435a4d306 100644
> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_pptable.h
> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_pptable.h
> @@ -72,8 +72,7 @@ enum ATOM_VEGA12_PPCLOCK_ID {
> typedef enum ATOM_VEGA12_PPCLOCK_ID ATOM_VEGA12_PPCLOCK_ID;
>
>
> -typedef struct _ATOM_VEGA12_POWERPLAYTABLE
> -{
> +typedef struct _ATOM_VEGA12_POWERPLAYTABLE {
> struct atom_common_table_header sHeader;
> UCHAR ucTableRevision;
> USHORT usTableSize;
> @@ -92,11 +91,11 @@ typedef struct _ATOM_VEGA12_POWERPLAYTABLE
> USHORT usODPowerSavePowerLimit;
> USHORT usSoftwareShutdownTemp;
>
> - ULONG PowerSavingClockMax [ATOM_VEGA12_PPCLOCK_COUNT];
> - ULONG PowerSavingClockMin [ATOM_VEGA12_PPCLOCK_COUNT];
> + ULONG PowerSavingClockMax[ATOM_VEGA12_PPCLOCK_COUNT];
> + ULONG PowerSavingClockMin[ATOM_VEGA12_PPCLOCK_COUNT];
>
> - ULONG ODSettingsMax [ATOM_VEGA12_ODSETTING_COUNT];
> - ULONG ODSettingsMin [ATOM_VEGA12_ODSETTING_COUNT];
> + ULONG ODSettingsMax[ATOM_VEGA12_ODSETTING_COUNT];
> + ULONG ODSettingsMin[ATOM_VEGA12_ODSETTING_COUNT];
>
> USHORT usReserve[5];
>
> --
> 2.17.1
>