linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sumeet Pawnikar <sumeet4linux@gmail.com>
To: daniel.lezcano@kernel.org, rafael@kernel.org, linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, sumeet4linux@gmail.com
Subject: [PATCH] powercap: dtpm: Fix format string issues in log messages
Date: Sat, 20 Dec 2025 00:15:20 +0530	[thread overview]
Message-ID: <20251219184521.379599-1-sumeet4linux@gmail.com> (raw)

Fix few format string issues in dtpm.c file,
- Extra trailing comma and space in the debug message "Registered
dtpm node '%s' / %llu-%llu uW, \n". This unnecessary trailing ", "
before the newline character, resulting an illusion of some more
message available for this under debug output.

- Incorrect log level for subsystem initialization failure message.
There is an error condition, not informational, and should be logged
at error level for consistency with other failure mssages. Changed
pr_info() to pr_err() for this subsystem initialization failure
message.

- The same error message "Failed to initialize '%s': %d" has missing
a trailing newline, which could cause log messages to be concatenated
incorrectly, making the logs harder to read.

These isseus affect log readability and consistency but do not impact
any functionality.

Signed-off-by: Sumeet Pawnikar <sumeet4linux@gmail.com>
---
 drivers/powercap/dtpm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/powercap/dtpm.c b/drivers/powercap/dtpm.c
index 129d55bc705c..2179f5c0fbbe 100644
--- a/drivers/powercap/dtpm.c
+++ b/drivers/powercap/dtpm.c
@@ -406,7 +406,7 @@ int dtpm_register(const char *name, struct dtpm *dtpm, struct dtpm *parent)
 		dtpm->power_limit = dtpm->power_max;
 	}
 
-	pr_debug("Registered dtpm node '%s' / %llu-%llu uW, \n",
+	pr_debug("Registered dtpm node '%s' / %llu-%llu uW\n",
 		 dtpm->zone.name, dtpm->power_min, dtpm->power_max);
 
 	return 0;
@@ -582,7 +582,7 @@ int dtpm_create_hierarchy(struct of_device_id *dtpm_match_table)
 
 		ret = dtpm_subsys[i]->init();
 		if (ret)
-			pr_info("Failed to initialize '%s': %d",
+			pr_err("Failed to initialize '%s': %d\n",
 				dtpm_subsys[i]->name, ret);
 	}
 
-- 
2.43.0


                 reply	other threads:[~2025-12-19 18:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251219184521.379599-1-sumeet4linux@gmail.com \
    --to=sumeet4linux@gmail.com \
    --cc=daniel.lezcano@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).