From: Matthew Wilcox <willy@infradead.org>
To: hui yang <yanghui.def@gmail.com>
Cc: cl@linux.com, penberg@kernel.org, rientjes@google.com,
linux-mm@kvack.org, iamjoonsoo.kim@lge.com
Subject: Re: [PATCH] mm: use __func__ replace function name
Date: Mon, 15 Jun 2020 04:47:59 -0700 [thread overview]
Message-ID: <20200615114759.GQ8681@bombadil.infradead.org> (raw)
In-Reply-To: <1592220534-4656-1-git-send-email-yanghui.def@gmail.com>
On Mon, Jun 15, 2020 at 07:28:54PM +0800, hui yang wrote:
> From: YangHui <yanghui.def@gmail.com>
>
> it's much better to use __func__
Not always. This message is reporting the improper usage of a public API.
If we were to, for example, split the function into two and rename this
half of it __kmem_cache_destroy(), we'd still want this message to say
kmem_cache_destroy.
I don't think we should apply this change, and if you have similar patches
in mind, I'd like to see a more detailed argument than "it's better".
> @@ -960,8 +960,8 @@ void kmem_cache_destroy(struct kmem_cache *s)
> err = shutdown_cache(s);
>
> if (err) {
> - pr_err("kmem_cache_destroy %s: Slab cache still has objects\n",
> - s->name);
> + pr_err("%s: %s: Slab cache still has objects\n",
> + __func__, s->name);
> dump_stack();
> }
> out_unlock:
prev parent reply other threads:[~2020-06-15 11:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 11:28 hui yang
2020-06-15 11:47 ` Matthew Wilcox [this message]
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=20200615114759.GQ8681@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=yanghui.def@gmail.com \
/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