From: Waiman Long <longman@redhat.com>
To: Thorsten Blum <thorsten.blum@toblux.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>, Will Deacon <will@kernel.org>
Cc: Boqun Feng <boqun.feng@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lockdep: Use str_plural() to fix Coccinelle warning
Date: Thu, 28 Mar 2024 08:41:10 -0400 [thread overview]
Message-ID: <9b15de60-b593-4b0c-bacc-ebe79de5d541@redhat.com> (raw)
In-Reply-To: <20240328100952.200379-3-thorsten.blum@toblux.com>
On 3/28/24 06:09, Thorsten Blum wrote:
> Fixes the following Coccinelle/coccicheck warning reported by
> string_choices.cocci:
>
> opportunity for str_plural(depth)
>
> Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
> ---
> kernel/locking/lockdep.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> index 151bd3de5936..31d7720c9b8d 100644
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -786,7 +786,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.
Acked-by: Waiman Long <longman@redhat.com>
next prev parent reply other threads:[~2024-03-28 12:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-28 10:09 Thorsten Blum
2024-03-28 12:41 ` Waiman Long [this message]
2024-04-21 23:17 ` [RESEND PATCH] " Thorsten Blum
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=9b15de60-b593-4b0c-bacc-ebe79de5d541@redhat.com \
--to=longman@redhat.com \
--cc=boqun.feng@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=thorsten.blum@toblux.com \
--cc=will@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
all inboxes | Powered by JetHome®