From patchwork Wed Sep 4 14:30:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13790994 Received: from albert.telenet-ops.be (albert.telenet-ops.be [195.130.137.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE5DC1DC07F for ; Wed, 4 Sep 2024 14:30:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.130.137.90 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725460263; cv=none; b=CxHyepFS2+wvDhiy6wL4uuRNC9aZZhdaOFfOVGptGog+4uJSbACDf/finVcBSoDnUCkWpfnyTkoy7TMx3QtqDEBJxjy3yCiBNG5HTeJlf3Gc/mbxOrv+g0iQkIuZeK0IX5Kg/6k43OCxY7UJV0YkKESW/IIMBRZKKjyLot6LIWI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725460263; c=relaxed/simple; bh=ck5HEjZevSTu8uCue2LCvHvhdo2sBkHkQBl5O3C9hmc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VjT2jDsnI//2Y2Lx2TrDxMHVgXD57SzelijHrkrfwbZCpMJGveFlTDs7EvwKBvkkOZOsMGTHS925Fp7FPraoczgmHbuhsY9aXoapPsie9FGTf2/ppaXxEOyUcu0zNzOe2koUxqFvmedpsbYSs20OKJF/bouNdo+gq8zs17JCyWU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=none smtp.mailfrom=linux-m68k.org; arc=none smtp.client-ip=195.130.137.90 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed80:ef52:68c5:eac1:f6b5]) by albert.telenet-ops.be with cmsmtp id 8EWv2D00C3m5in106EWvSM; Wed, 04 Sep 2024 16:30:57 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1slr24-0028JP-Hu; Wed, 04 Sep 2024 16:30:55 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1slr27-004MyD-8m; Wed, 04 Sep 2024 16:30:55 +0200 From: Geert Uytterhoeven To: Ulf Hansson , Viresh Kumar , "Rafael J . Wysocki" , Dmitry Osipenko , Dmitry Baryshkov , Jagadeesh Kona , Taniya Das , Abel Vesa Cc: linux-pm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 2/4] pmdomain: core: Fix "managed by" alignment in debug summary Date: Wed, 4 Sep 2024 16:30:46 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 --- 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,