The functions are only used when certain config options are set. Putting them inside #ifdef fixes the following warnings when building with clang: mm/slub.c:1759:28: error: unused function 'tid_to_cpu' [-Werror,-Wunused-function] ^ mm/slub.c:1764:29: error: unused function 'tid_to_event' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke <mka@xxxxxxxxxxxx> --- mm/slub.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mm/slub.c b/mm/slub.c index 23a8eb83efff..6df95738420d 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1945,15 +1945,19 @@ static inline unsigned long next_tid(unsigned long tid) return tid + TID_STEP; } +#ifdef SLUB_DEBUG_CMPXCHG +#ifdef CONFIG_PREEMPT static inline unsigned int tid_to_cpu(unsigned long tid) { return tid % TID_STEP; } +#endif static inline unsigned long tid_to_event(unsigned long tid) { return tid / TID_STEP; } +#endif static inline unsigned int init_tid(int cpu) { -- 2.13.0.303.g4ebf302169-goog -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>