[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <e004f9d2a75e9a49c269507bb8a4514001751e85.1725459707.git.geert+renesas@glider.be>
Date: Wed, 4 Sep 2024 16:30:46 +0200
From: Geert Uytterhoeven <geert+renesas@...der.be>
To: Ulf Hansson <ulf.hansson@...aro.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
Dmitry Osipenko <digetx@...il.com>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Jagadeesh Kona <quic_jkona@...cinc.com>,
Taniya Das <quic_tdas@...cinc.com>,
Abel Vesa <abel.vesa@...aro.org>
Cc: linux-pm@...r.kernel.org,
linux-renesas-soc@...r.kernel.org,
linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert+renesas@...der.be>
Subject: [PATCH 2/4] pmdomain: core: Fix "managed by" alignment in debug summary
The "performance" column contains variable-width values. Hence when
their printed values contain more than one digit, all values in
successive columns become misaligned.
Fix this by formatting it as a fixed-width field. Adjust successive
spaces and field widths to retain the exiting layout.
Fixes: 0155aaf95a2a09ba ("PM: domains: Add the domain HW-managed mode to the summary")
Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
---
Tested by printing pseudo-random numbers instead of the actual
performance_state, as the latter is always zero for me.
---
drivers/pmdomain/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c
index afa4e75863a40b49..912bdc131fc0e2b1 100644
--- a/drivers/pmdomain/core.c
+++ b/drivers/pmdomain/core.c
@@ -3317,7 +3317,7 @@ static void mode_status_str(struct seq_file *s, struct device *dev)
gpd_data = to_gpd_data(dev->power.subsys_data->domain_data);
- seq_printf(s, "%20s", gpd_data->hw_mode ? "HW" : "SW");
+ seq_printf(s, "%9s", gpd_data->hw_mode ? "HW" : "SW");
}
static void perf_status_str(struct seq_file *s, struct device *dev)
@@ -3325,7 +3325,7 @@ static void perf_status_str(struct seq_file *s, struct device *dev)
struct generic_pm_domain_data *gpd_data;
gpd_data = to_gpd_data(dev->power.subsys_data->domain_data);
- seq_put_decimal_ull(s, "", gpd_data->performance_state);
+ seq_printf(s, "%-10u ", gpd_data->performance_state);
}
static int genpd_summary_one(struct seq_file *s,
--
2.34.1
Powered by blists - more mailing lists