diff options
author | gumingtao <[email protected]> | 2021-06-28 19:34:27 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2021-06-29 10:53:46 -0700 |
commit | 4acaa7d5045e21d5469232d0e6e79cdaf6755754 (patch) | |
tree | 6f62334654c2c79b62303a1213da4b82979a7b0e | |
parent | 256f7a6791e8f19bafa1d702f69a6a6ba16250e3 (diff) |
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 <[email protected]>
Acked-by: Christoph Lameter <[email protected]>
Acked-by: David Rientjes <[email protected]>
Reviewed-by: Aaron Tomlin <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/slab_common.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c index 7cab77655f11..1ded52592b56 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -377,11 +377,11 @@ out_unlock: if (err) { if (flags & SLAB_PANIC) - panic("kmem_cache_create: Failed to create slab '%s'. Error %d\n", - name, err); + panic("%s: Failed to create slab '%s'. Error %d\n", + __func__, name, err); else { - pr_warn("kmem_cache_create(%s) failed with error %d\n", - name, err); + pr_warn("%s(%s) failed with error %d\n", + __func__, name, err); dump_stack(); } return NULL; @@ -508,8 +508,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: |