]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
sched/cpufreq: Use %pe format for PTR_ERR() printing
authorzenghongling <zenghongling@kylinos.cn>
Tue, 20 Jan 2026 08:33:33 +0000 (16:33 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 3 Feb 2026 11:04:19 +0000 (12:04 +0100)
Use %pe format specifier for printing PTR_ERR() error values
to make error messages more readable.

Found by Coccinelle:
./cpufreq_schedutil.c:685:49-56: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: zenghongling <zenghongling@kylinos.cn>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260120083333.148385-1-zenghongling@kylinos.cn
kernel/sched/cpufreq_schedutil.c

index 0ab5f9d4bc59a96c5aea3e483492e36656baa3cf..cfc40181f66e2cb0f2cbad28be2b57aaee1db682 100644 (file)
@@ -682,7 +682,7 @@ static int sugov_kthread_create(struct sugov_policy *sg_policy)
                                "sugov:%d",
                                cpumask_first(policy->related_cpus));
        if (IS_ERR(thread)) {
-               pr_err("failed to create sugov thread: %ld\n", PTR_ERR(thread));
+               pr_err("failed to create sugov thread: %pe\n", thread);
                return PTR_ERR(thread);
        }