aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorQian Cai <cai@lca.pw>2019-09-23 15:33:52 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-09-24 15:54:07 -0700
commit9d5f0be0f7556873cd00125dc579a9d9d186b0d0 (patch)
treef54fb3f6b7d367020cca4b914834ed9068e1f8d8 /mm/slub.c
parentmm, slab: move memcg_cache_params structure to mm/slab.h (diff)
downloadlinux-dev-9d5f0be0f7556873cd00125dc579a9d9d186b0d0.tar.xz
linux-dev-9d5f0be0f7556873cd00125dc579a9d9d186b0d0.zip
mm/slub.c: fix -Wunused-function compiler warnings
tid_to_cpu() and tid_to_event() are only used in note_cmpxchg_failure() when SLUB_DEBUG_CMPXCHG=y, so when SLUB_DEBUG_CMPXCHG=n by default, Clang will complain that those unused functions. Link: http://lkml.kernel.org/r/1568752232-5094-1-git-send-email-cai@lca.pw Signed-off-by: Qian Cai <cai@lca.pw> Acked-by: David Rientjes <rientjes@google.com> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--mm/slub.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 66808d3e97d2..17fe1cac11fb 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2004,6 +2004,7 @@ static inline unsigned long next_tid(unsigned long tid)
return tid + TID_STEP;
}
+#ifdef SLUB_DEBUG_CMPXCHG
static inline unsigned int tid_to_cpu(unsigned long tid)
{
return tid % TID_STEP;
@@ -2013,6 +2014,7 @@ static inline unsigned long tid_to_event(unsigned long tid)
{
return tid / TID_STEP;
}
+#endif
static inline unsigned int init_tid(int cpu)
{