Skip to contentSkip to conversation

drm/amd/pm: fix indenting in __smu_cmn_reg_print_error()

PATCH Applied Dan Carpenter 3 participants 3 messages Mar 14, 2022 – Mar 15, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/pm: fix indenting in __smu_cmn_reg_print_error()

Smatch complains that the dev_err_ratelimited() is indented one tab more than the surrounding lines.

	drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu_cmn.c:174
	__smu_cmn_reg_print_error() warn: inconsistent indenting

It looks like it's not a bug, just that the indenting needs to be cleaned up.

---
 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +8 -8
index ae64d1980f10..b8d0c70ff668 100644
@@ -164,17 +164,17 @@ static void __smu_cmn_reg_print_error(struct smu_context *smu,
 
 	switch (reg_c2pmsg_90) {
 	case SMU_RESP_NONE: {
-	if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 5)) {
-		msg_idx = RREG32_SOC15(MP1, 0, mmMP1_C2PMSG_2);
-		prm     = RREG32_SOC15(MP1, 0, mmMP1_C2PMSG_34);
-	} else {
-		msg_idx = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_66);
-		prm     = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_82);
-	}
+		if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 5)) {
+			msg_idx = RREG32_SOC15(MP1, 0, mmMP1_C2PMSG_2);
+			prm     = RREG32_SOC15(MP1, 0, mmMP1_C2PMSG_34);
+		} else {
+			msg_idx = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_66);
+			prm     = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_82);
+		}
 		dev_err_ratelimited(adev->dev,
 				    "SMU: I'm not done with your previous command: SMN_C2PMSG_66:0x%08X SMN_C2PMSG_82:0x%08X",
 				    msg_idx, prm);
-	}
+		}
 		break;
 	case SMU_RESP_OK:
 		/* The SMU executed the command. It completed with a
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw

Thanks!

Regards,
Luben

Quoted 34 lines · Dan Carpenter

Smatch complains that the dev_err_ratelimited() is indented one tab more than the surrounding lines.

	drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu_cmn.c:174
	__smu_cmn_reg_print_error() warn: inconsistent indenting

It looks like it's not a bug, just that the indenting needs to be cleaned up.

---
 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +5 -7
index ae64d1980f10..b8d0c70ff668 100644
@@ -164,17 +164,17 @@ static void __smu_cmn_reg_print_error(struct smu_context *smu,
 
 	switch (reg_c2pmsg_90) {
 	case SMU_RESP_NONE: {
-	if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 5)) {
-		msg_idx = RREG32_SOC15(MP1, 0, mmMP1_C2PMSG_2);
-		prm     = RREG32_SOC15(MP1, 0, mmMP1_C2PMSG_34);
-	} else {
-		msg_idx = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_66);
-		prm     = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_82);
-	}
+		if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 5)) {
+			msg_idx = RREG32_SOC15(MP1, 0, mmMP1_C2PMSG_2);
+			prm     = RREG32_SOC15(MP1, 0, mmMP1_C2PMSG_34);
+		} else {
+			msg_idx = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_66);

drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c static void __smu_cmn_reg_print_error(struct smu_context *smu, · line 180

Quoted 10 lines
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +3 -1
+			prm     = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_82);
+		}
 		dev_err_ratelimited(adev->dev,
 				    "SMU: I'm not done with your previous command: SMN_C2PMSG_66:0x%08X SMN_C2PMSG_82:0x%08X",
 				    msg_idx, prm);
-	}
+		}
 		break;
 	case SMU_RESP_OK:
 		/* The SMU executed the command. It completed with a

Regards,

Signature · 1 line
Luben
Applied
#2 lore raw

Applied. Thanks!

Alex

Quoted 57 lines · Luben Tuikov

Thanks!

Regards,
Luben

Quoted 34 lines · Dan Carpenter

Smatch complains that the dev_err_ratelimited() is indented one tab more than the surrounding lines.

drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu_cmn.c:174 __smu_cmn_reg_print_error() warn: inconsistent indenting

It looks like it's not a bug, just that the indenting needs to be cleaned up.

---
 drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +5 -7
index ae64d1980f10..b8d0c70ff668 100644
@@ -164,17 +164,17 @@ static void __smu_cmn_reg_print_error(struct smu_context *smu,
 
      switch (reg_c2pmsg_90) {
      case SMU_RESP_NONE: {
-     if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 5)) {
-             msg_idx = RREG32_SOC15(MP1, 0, mmMP1_C2PMSG_2);
-             prm     = RREG32_SOC15(MP1, 0, mmMP1_C2PMSG_34);
-     } else {
-             msg_idx = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_66);
-             prm     = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_82);
-     }
+             if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 5)) {
+                     msg_idx = RREG32_SOC15(MP1, 0, mmMP1_C2PMSG_2);
+                     prm     = RREG32_SOC15(MP1, 0, mmMP1_C2PMSG_34);
+             } else {
+                     msg_idx = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_66);

drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c static void __smu_cmn_reg_print_error(struct smu_context *smu, · line 180

Quoted 10 lines
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +3 -1
+                     prm     = RREG32_SOC15(MP1, 0, mmMP1_SMN_C2PMSG_82);
+             }
              dev_err_ratelimited(adev->dev,
                                  "SMU: I'm not done with your previous command: SMN_C2PMSG_66:0x%08X SMN_C2PMSG_82:0x%08X",
                                  msg_idx, prm);
-     }
+             }
              break;
      case SMU_RESP_OK:
              /* The SMU executed the command. It completed with a

Regards,
--
Luben