Skip to content

Commit 4acaa7d

Browse files
GuMingtaotorvalds
authored andcommitted
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.com Signed-off-by: gumingtao <gumingtao@xiaomi.com> Acked-by: Christoph Lameter <cl@linux.com> Acked-by: David Rientjes <rientjes@google.com> Reviewed-by: Aaron 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 256f7a6 commit 4acaa7d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mm/slab_common.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,11 @@ kmem_cache_create_usercopy(const char *name,
377377

378378
if (err) {
379379
if (flags & SLAB_PANIC)
380-
panic("kmem_cache_create: Failed to create slab '%s'. Error %d\n",
381-
name, err);
380+
panic("%s: Failed to create slab '%s'. Error %d\n",
381+
__func__, name, err);
382382
else {
383-
pr_warn("kmem_cache_create(%s) failed with error %d\n",
384-
name, err);
383+
pr_warn("%s(%s) failed with error %d\n",
384+
__func__, name, err);
385385
dump_stack();
386386
}
387387
return NULL;
@@ -508,8 +508,8 @@ void kmem_cache_destroy(struct kmem_cache *s)
508508

509509
err = shutdown_cache(s);
510510
if (err) {
511-
pr_err("kmem_cache_destroy %s: Slab cache still has objects\n",
512-
s->name);
511+
pr_err("%s %s: Slab cache still has objects\n",
512+
__func__, s->name);
513513
dump_stack();
514514
}
515515
out_unlock:

0 commit comments

Comments
 (0)