Skip to contentSkip to conversation

drm/amd/pm/powerplay/hwmgr/hwmgr: Clean up errors in hwmgr.c

PATCH Applied Ran Sun 2 participants 2 messages Aug 1, 2023 – Aug 7, 2023

Subsystems (3)
lore
Share & tools
lore

Ran Sun

author
#0 lore raw

PATCH 1/1 drm/amd/pm/powerplay/hwmgr/hwmgr: Clean up errors in hwmgr.c

Fix the following errors reported by checkpatch:

ERROR: space prohibited after that '~' (ctx:WxW)
ERROR: spaces required around that '||' (ctx:VxW)

---
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c +3 -3
index f2cef0930aa9..2b5ac21fee39 100644
@@ -120,7 +120,7 @@ int hwmgr_early_init(struct pp_hwmgr *hwmgr)
 		case CHIP_TOPAZ:
 			hwmgr->smumgr_funcs = &iceland_smu_funcs;
 			topaz_set_asic_special_caps(hwmgr);
-			hwmgr->feature_mask &= ~ (PP_VBI_TIME_SUPPORT_MASK |
+			hwmgr->feature_mask &= ~(PP_VBI_TIME_SUPPORT_MASK |
 						PP_ENABLE_GFX_CG_THRU_SMU);
 			hwmgr->pp_table_version = PP_TABLE_V0;
 			hwmgr->od_enabled = false;
@@ -133,7 +133,7 @@ int hwmgr_early_init(struct pp_hwmgr *hwmgr)
 		case CHIP_FIJI:
 			hwmgr->smumgr_funcs = &fiji_smu_funcs;
 			fiji_set_asic_special_caps(hwmgr);
-			hwmgr->feature_mask &= ~ (PP_VBI_TIME_SUPPORT_MASK |
+			hwmgr->feature_mask &= ~(PP_VBI_TIME_SUPPORT_MASK |
 						PP_ENABLE_GFX_CG_THRU_SMU);
 			break;
 		case CHIP_POLARIS11:
@@ -195,7 +195,7 @@ int hwmgr_early_init(struct pp_hwmgr *hwmgr)
 
 int hwmgr_sw_init(struct pp_hwmgr *hwmgr)
 {
-	if (!hwmgr|| !hwmgr->smumgr_funcs || !hwmgr->smumgr_funcs->smu_init)
+	if (!hwmgr || !hwmgr->smumgr_funcs || !hwmgr->smumgr_funcs->smu_init)
 		return -EINVAL;
 
 	phm_register_irq_handlers(hwmgr);
Signature · 1 line
2.17.1
Applied
#1 lore raw

Applied. Thanks!

Quoted 45 lines · Ran Sun

Fix the following errors reported by checkpatch:

ERROR: space prohibited after that '~' (ctx:WxW)
ERROR: spaces required around that '||' (ctx:VxW)

---
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c +3 -4
index f2cef0930aa9..2b5ac21fee39 100644
@@ -120,7 +120,7 @@ int hwmgr_early_init(struct pp_hwmgr *hwmgr)
                case CHIP_TOPAZ:
                        hwmgr->smumgr_funcs = &iceland_smu_funcs;
                        topaz_set_asic_special_caps(hwmgr);
-                       hwmgr->feature_mask &= ~ (PP_VBI_TIME_SUPPORT_MASK |
+                       hwmgr->feature_mask &= ~(PP_VBI_TIME_SUPPORT_MASK |
                                                PP_ENABLE_GFX_CG_THRU_SMU);
                        hwmgr->pp_table_version = PP_TABLE_V0;
                        hwmgr->od_enabled = false;
@@ -133,7 +133,7 @@ int hwmgr_early_init(struct pp_hwmgr *hwmgr)
                case CHIP_FIJI:
                        hwmgr->smumgr_funcs = &fiji_smu_funcs;
                        fiji_set_asic_special_caps(hwmgr);
-                       hwmgr->feature_mask &= ~ (PP_VBI_TIME_SUPPORT_MASK |
+                       hwmgr->feature_mask &= ~(PP_VBI_TIME_SUPPORT_MASK |
                                                PP_ENABLE_GFX_CG_THRU_SMU);
                        break;
                case CHIP_POLARIS11:
@@ -195,7 +195,7 @@ int hwmgr_early_init(struct pp_hwmgr *hwmgr)
 
 int hwmgr_sw_init(struct pp_hwmgr *hwmgr)
 {
-       if (!hwmgr|| !hwmgr->smumgr_funcs || !hwmgr->smumgr_funcs->smu_init)
+       if (!hwmgr || !hwmgr->smumgr_funcs || !hwmgr->smumgr_funcs->smu_init)
                return -EINVAL;
 
        phm_register_irq_handlers(hwmgr);
--

2.17.1