Skip to content

Commit 742fe83

Browse files
zenghongling0719Peter Zijlstra
authored andcommitted
sched/cpufreq: Use %pe format for PTR_ERR() printing
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
1 parent 94894c9 commit 742fe83

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/sched/cpufreq_schedutil.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ static int sugov_kthread_create(struct sugov_policy *sg_policy)
682682
"sugov:%d",
683683
cpumask_first(policy->related_cpus));
684684
if (IS_ERR(thread)) {
685-
pr_err("failed to create sugov thread: %ld\n", PTR_ERR(thread));
685+
pr_err("failed to create sugov thread: %pe\n", thread);
686686
return PTR_ERR(thread);
687687
}
688688

0 commit comments

Comments
 (0)