Commit 4acaa7d5 authored by gumingtao's avatar gumingtao Committed by Linus Torvalds

slab: use __func__ to trace function name

It is better to use __func__ to trace function name.

Link: https://lkml.kernel.org/r/31fdbad5c45cd1e26be9ff37be321b8586b80fee.1624355507.git.gumingtao@xiaomi.comSigned-off-by: default avatargumingtao <gumingtao@xiaomi.com>
Acked-by: default avatarChristoph Lameter <cl@linux.com>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Reviewed-by: default avatarAaron Tomlin <atomlin@redhat.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 256f7a67
...@@ -377,11 +377,11 @@ kmem_cache_create_usercopy(const char *name, ...@@ -377,11 +377,11 @@ kmem_cache_create_usercopy(const char *name,
if (err) { if (err) {
if (flags & SLAB_PANIC) if (flags & SLAB_PANIC)
panic("kmem_cache_create: Failed to create slab '%s'. Error %d\n", panic("%s: Failed to create slab '%s'. Error %d\n",
name, err); __func__, name, err);
else { else {
pr_warn("kmem_cache_create(%s) failed with error %d\n", pr_warn("%s(%s) failed with error %d\n",
name, err); __func__, name, err);
dump_stack(); dump_stack();
} }
return NULL; return NULL;
...@@ -508,8 +508,8 @@ void kmem_cache_destroy(struct kmem_cache *s) ...@@ -508,8 +508,8 @@ void kmem_cache_destroy(struct kmem_cache *s)
err = shutdown_cache(s); err = shutdown_cache(s);
if (err) { if (err) {
pr_err("kmem_cache_destroy %s: Slab cache still has objects\n", pr_err("%s %s: Slab cache still has objects\n",
s->name); __func__, s->name);
dump_stack(); dump_stack();
} }
out_unlock: out_unlock:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment