Commit 9d5f0be0 authored by Qian Cai's avatar Qian Cai Committed by Linus Torvalds

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.pwSigned-off-by: default avatarQian Cai <cai@lca.pw>
Acked-by: default avatarDavid 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9adeaa22
...@@ -2004,6 +2004,7 @@ static inline unsigned long next_tid(unsigned long tid) ...@@ -2004,6 +2004,7 @@ static inline unsigned long next_tid(unsigned long tid)
return tid + TID_STEP; return tid + TID_STEP;
} }
#ifdef SLUB_DEBUG_CMPXCHG
static inline unsigned int tid_to_cpu(unsigned long tid) static inline unsigned int tid_to_cpu(unsigned long tid)
{ {
return tid % TID_STEP; return tid % TID_STEP;
...@@ -2013,6 +2014,7 @@ static inline unsigned long tid_to_event(unsigned long tid) ...@@ -2013,6 +2014,7 @@ static inline unsigned long tid_to_event(unsigned long tid)
{ {
return tid / TID_STEP; return tid / TID_STEP;
} }
#endif
static inline unsigned int init_tid(int cpu) static inline unsigned int init_tid(int cpu)
{ {
......
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