OSDN Git Service

drm/amd/pm: Clean up errors in amd_powerplay.c
authorRan Sun <sunran001@208suo.com>
Tue, 1 Aug 2023 02:36:58 +0000 (02:36 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 9 Aug 2023 13:40:21 +0000 (09:40 -0400)
Fix the following errors reported by checkpatch:

ERROR: that open brace { should be on the previous line
ERROR: spaces required around that '||' (ctx:WxO)

Signed-off-by: Ran Sun <sunran001@208suo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c

index ff360c6..9e4f8a4 100644 (file)
@@ -612,7 +612,7 @@ static int pp_dpm_get_pp_num_states(void *handle,
 
        memset(data, 0, sizeof(*data));
 
-       if (!hwmgr || !hwmgr->pm_en ||!hwmgr->ps)
+       if (!hwmgr || !hwmgr->pm_en || !hwmgr->ps)
                return -EINVAL;
 
        data->nums = hwmgr->num_ps;
@@ -644,7 +644,7 @@ static int pp_dpm_get_pp_table(void *handle, char **table)
 {
        struct pp_hwmgr *hwmgr = handle;
 
-       if (!hwmgr || !hwmgr->pm_en ||!hwmgr->soft_pp_table)
+       if (!hwmgr || !hwmgr->pm_en || !hwmgr->soft_pp_table)
                return -EINVAL;
 
        *table = (char *)hwmgr->soft_pp_table;
@@ -1002,7 +1002,7 @@ static int pp_get_power_limit(void *handle, uint32_t *limit,
        struct pp_hwmgr *hwmgr = handle;
        int ret = 0;
 
-       if (!hwmgr || !hwmgr->pm_en ||!limit)
+       if (!hwmgr || !hwmgr->pm_en || !limit)
                return -EINVAL;
 
        if (power_type != PP_PWR_TYPE_SUSTAINED)
@@ -1047,7 +1047,7 @@ static int pp_get_display_power_level(void *handle,
 {
        struct pp_hwmgr *hwmgr = handle;
 
-       if (!hwmgr || !hwmgr->pm_en ||!output)
+       if (!hwmgr || !hwmgr->pm_en || !output)
                return -EINVAL;
 
        return phm_get_dal_power_level(hwmgr, output);
@@ -1120,7 +1120,7 @@ static int pp_get_clock_by_type_with_latency(void *handle,
 {
        struct pp_hwmgr *hwmgr = handle;
 
-       if (!hwmgr || !hwmgr->pm_en ||!clocks)
+       if (!hwmgr || !hwmgr->pm_en || !clocks)
                return -EINVAL;
 
        return phm_get_clock_by_type_with_latency(hwmgr, type, clocks);
@@ -1132,7 +1132,7 @@ static int pp_get_clock_by_type_with_voltage(void *handle,
 {
        struct pp_hwmgr *hwmgr = handle;
 
-       if (!hwmgr || !hwmgr->pm_en ||!clocks)
+       if (!hwmgr || !hwmgr->pm_en || !clocks)
                return -EINVAL;
 
        return phm_get_clock_by_type_with_voltage(hwmgr, type, clocks);
@@ -1155,7 +1155,7 @@ static int pp_display_clock_voltage_request(void *handle,
 {
        struct pp_hwmgr *hwmgr = handle;
 
-       if (!hwmgr || !hwmgr->pm_en ||!clock)
+       if (!hwmgr || !hwmgr->pm_en || !clock)
                return -EINVAL;
 
        return phm_display_clock_voltage_request(hwmgr, clock);
@@ -1167,7 +1167,7 @@ static int pp_get_display_mode_validation_clocks(void *handle,
        struct pp_hwmgr *hwmgr = handle;
        int ret = 0;
 
-       if (!hwmgr || !hwmgr->pm_en ||!clocks)
+       if (!hwmgr || !hwmgr->pm_en || !clocks)
                return -EINVAL;
 
        clocks->level = PP_DAL_POWERLEVEL_7;