lockdep: Use str_plural() to fix Coccinelle warning
Fixes the following Coccinelle/coccicheck warning reported by string_choices.cocci: opportunity for str_plural(depth) Acked-by: Waiman Long <longman@redhat.com> Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Link: https://lore.kernel.org/r/20240528120008.403511-2-thorsten.blum@toblux.com
This commit is contained in:
parent
d5934e7631
commit
13c267f0c2
@ -785,7 +785,7 @@ static void lockdep_print_held_locks(struct task_struct *p)
|
||||
printk("no locks held by %s/%d.\n", p->comm, task_pid_nr(p));
|
||||
else
|
||||
printk("%d lock%s held by %s/%d:\n", depth,
|
||||
depth > 1 ? "s" : "", p->comm, task_pid_nr(p));
|
||||
str_plural(depth), p->comm, task_pid_nr(p));
|
||||
/*
|
||||
* It's not reliable to print a task's held locks if it's not sleeping
|
||||
* and it's not the current task.
|
||||
|
Loading…
Reference in New Issue
Block a user