Skip to contentSkip to conversation

util: atcsmu.c: fix typo "%s/hard/hart/"

PATCH New Leo Yu-Chi Liang 2 participants 4 messages Aug 1, 2024 – Aug 24, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 util: atcsmu.c: fix typo "%s/hard/hart/"

%s/hard/hart

---
 lib/utils/sys/atcsmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/utils/sys/atcsmu.c +1 -1
index 8ddd88d5..676c91f4 100644
@@ -84,7 +84,7 @@ inline int smu_set_reset_vector(struct smu_data *smu, ulong wakeup_addr,
 
 	if (reset_vector != (u64)wakeup_addr) {
 		sbi_printf(
-			"hard%d (PCS%d): Failed to program the reset vector.\n",
+			"hart%d (PCS%d): Failed to program the reset vector.\n",
 			hartid, hartid + 3);
 		return SBI_EFAIL;
 	} else
Signature · 1 line
2.34.1
#1 lore raw

PATCH v3 2/2 util: atcsmu.c: modify sbi_printf() formatting

From: Yu Chien Peter Lin <[email protected]>

Beautify multi-line printing.

---
 lib/utils/sys/atcsmu.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
lib/utils/sys/atcsmu.c +6 -9
index 676c91f4..2cba0eb7 100644
@@ -37,17 +37,15 @@ inline bool smu_support_sleep_mode(struct smu_data *smu, u32 sleep_mode,
 	switch (sleep_mode) {
 	case LIGHTSLEEP_MODE:
 		if (EXTRACT_FIELD(pcs_cfg, PCS_CFG_LIGHT_SLEEP) == 0) {
-			sbi_printf(
-				"SMU: hart%d (PCS%d) does not support light sleep mode\n",
-				hartid, hartid + 3);
+			sbi_printf("SMU: hart%d (PCS%d) does not support light sleep mode\n",
+				   hartid, hartid + 3);
 			return false;
 		}
 		break;
 	case DEEPSLEEP_MODE:
 		if (EXTRACT_FIELD(pcs_cfg, PCS_CFG_DEEP_SLEEP) == 0) {
-			sbi_printf(
-				"SMU: hart%d (PCS%d) does not support deep sleep mode\n",
-				hartid, hartid + 3);
+			sbi_printf("SMU: hart%d (PCS%d) does not support deep sleep mode\n",
+				   hartid, hartid + 3);
 			return false;
 		}
 		break;
@@ -83,9 +81,8 @@ inline int smu_set_reset_vector(struct smu_data *smu, ulong wakeup_addr,
 	reset_vector = ((u64)vec_hi << 32) | vec_lo;
 
 	if (reset_vector != (u64)wakeup_addr) {
-		sbi_printf(
-			"hart%d (PCS%d): Failed to program the reset vector.\n",
-			hartid, hartid + 3);
+		sbi_printf("hart%d (PCS%d): Failed to program the reset vector.\n",
+			   hartid, hartid + 3);
 		return SBI_EFAIL;
 	} else
 		return 0;
Signature · 1 line
2.34.1
Applied
#2 lore raw

PATCH v3 2/2 util: atcsmu.c: modify sbi_printf() formatting

Quoted 7 lines · On Thu, Aug 1, 2024 at 12:56?PM Leo Yu-Chi Liang <[email protected]> wrote:

From: Yu Chien Peter Lin <[email protected]>

Beautify multi-line printing.

LGTM.

Applied this patch to the riscv/opensbi repo.

Thanks,
Anup

Quoted 50 lines
---
 lib/utils/sys/atcsmu.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
lib/utils/sys/atcsmu.c +6 -10
index 676c91f4..2cba0eb7 100644
@@ -37,17 +37,15 @@ inline bool smu_support_sleep_mode(struct smu_data *smu, u32 sleep_mode,
        switch (sleep_mode) {
        case LIGHTSLEEP_MODE:
                if (EXTRACT_FIELD(pcs_cfg, PCS_CFG_LIGHT_SLEEP) == 0) {
-                       sbi_printf(
-                               "SMU: hart%d (PCS%d) does not support light sleep mode\n",
-                               hartid, hartid + 3);
+                       sbi_printf("SMU: hart%d (PCS%d) does not support light sleep mode\n",
+                                  hartid, hartid + 3);
                        return false;
                }
                break;
        case DEEPSLEEP_MODE:
                if (EXTRACT_FIELD(pcs_cfg, PCS_CFG_DEEP_SLEEP) == 0) {
-                       sbi_printf(
-                               "SMU: hart%d (PCS%d) does not support deep sleep mode\n",
-                               hartid, hartid + 3);
+                       sbi_printf("SMU: hart%d (PCS%d) does not support deep sleep mode\n",
+                                  hartid, hartid + 3);
                        return false;
                }
                break;
@@ -83,9 +81,8 @@ inline int smu_set_reset_vector(struct smu_data *smu, ulong wakeup_addr,
        reset_vector = ((u64)vec_hi << 32) | vec_lo;
 
        if (reset_vector != (u64)wakeup_addr) {
-               sbi_printf(
-                       "hart%d (PCS%d): Failed to program the reset vector.\n",
-                       hartid, hartid + 3);
+               sbi_printf("hart%d (PCS%d): Failed to program the reset vector.\n",
+                          hartid, hartid + 3);
                return SBI_EFAIL;
        } else
                return 0;
--

2.34.1

--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi

Applied
#3 lore raw

PATCH v3 1/2 util: atcsmu.c: fix typo "%s/hard/hart/"

In reply to Leo Yu-Chi Liang
Quoted 5 lines · On Thu, Aug 1, 2024 at 12:56?PM Leo Yu-Chi Liang <[email protected]> wrote:

%s/hard/hart

LGTM.

Applied this patch to the riscv/opensbi repo.

Thanks,
Anup

Quoted 25 lines
---
 lib/utils/sys/atcsmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/utils/sys/atcsmu.c +1 -2
index 8ddd88d5..676c91f4 100644
@@ -84,7 +84,7 @@ inline int smu_set_reset_vector(struct smu_data *smu, ulong wakeup_addr,
 
        if (reset_vector != (u64)wakeup_addr) {
                sbi_printf(
-                       "hard%d (PCS%d): Failed to program the reset vector.\n",
+                       "hart%d (PCS%d): Failed to program the reset vector.\n",
                        hartid, hartid + 3);
                return SBI_EFAIL;
        } else
--

2.34.1

--
opensbi mailing list
opensbi at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi