Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5786934ybe; Tue, 17 Sep 2019 13:33:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqB+5g0jxqHyYN8yNenyGgcMAXfn9uSH4/rEfeP5QvEyW1cNQR4Janpqf1WOGzXIj1+D0Q X-Received: by 2002:a17:906:b34c:: with SMTP id cd12mr6583599ejb.48.1568752392783; Tue, 17 Sep 2019 13:33:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568752392; cv=none; d=google.com; s=arc-20160816; b=eWznk22Zks9zFEfFlbbHfWeuH3cWmpAhOhMJ+6CzFKon8DbS2jsBhfDqNO4riuLw3D J8yOgvaH4OUVG0XOG8GxjcaTsqM0dPqMw+2udawq1nkQenov/0IT1d7ZHOcMeRjjKEI1 3qaXyaiF5yzX34DS/bQ8KE7Kv9YyOQGE1EE82cXIcjefH0wlug+7/4IICTnk5Ul5P/FZ KgjmGsI/MtQ7/6wCc7I3gQdMP8ERmaOzZ+zrG72t37+bv1rLFpvdC5J+30ZEc2ezUJFv YGTrKFFgn7UAf9LzOkNA+aN4SejRQG+6dkl+0fOLu4GB/b7T0tOK4QHPT7/GyZfIX5C8 vFEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=FapF/w8V6L5P4RP46nAQFrAdDN4jwAlxC54JDkAvfWE=; b=eQ5nkPhWZTNc3Aq4acD1ZH1z7tB9cexQwrSIull0FnVeG4QyyzO3jXxSeIyxdlwPnv 7khv6auFUZlHW6v786bXk2GXLFtbW5GbUC2miBa8tvW2yLTfwZR7NEb0nrvzaIY/sgWx 6Kj69KF5KtL8ULWAaF0vW34yk8bwrp9+KOmxC4mRetHg8A8p20kGazoZ+U7MT1nU4r4m PghcxCV9IpZSx4Wv9dN0j+B2zgiVv6UCt+b5zwSeXVM/NI1tzHToB/Pauh3Byp/hhcDX +XHu9lYLdGD3zb/xVTOGksMcrde20mSLSXjco7USbXNVJVtGxBahqeNM9GumeSttD+yV gLag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=b2heVtMa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d23si2007728edb.55.2019.09.17.13.32.48; Tue, 17 Sep 2019 13:33:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=b2heVtMa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728281AbfIQUao (ORCPT + 99 others); Tue, 17 Sep 2019 16:30:44 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:43568 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726636AbfIQUao (ORCPT ); Tue, 17 Sep 2019 16:30:44 -0400 Received: by mail-qk1-f196.google.com with SMTP id h126so5459150qke.10 for ; Tue, 17 Sep 2019 13:30:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=from:to:cc:subject:date:message-id; bh=FapF/w8V6L5P4RP46nAQFrAdDN4jwAlxC54JDkAvfWE=; b=b2heVtMaAE//iiVUcKsZr0w7awdslPkqyQbYNyjGPHEL5W+LgsLzJdHgLusSCvcjFf YvSE5Y384otm0G5eZOgbTalFDAnlo01PRpnbLoB2ayOgzzTvNYCOnP4IGWEDYDbQ4qVD dLFolbhNPH4v6x1Pps+vdpjxTD8MKBvF9f5WuyV4U/4gF4NrkK8t59Lk1P6YK3FtQTW5 hkfqNyCR2qrlhcy5XdsCerD3vDypFmfHqqZDSITyUW3Bpfw6Pwbmq7Wfcg/fHMOiKMxO PypYyKoxR5XSuCydNmltfumpdY8vQfvEYwhwI+VzGz4AnmdtC70mTm1ttcp//WcrmOwp Cytw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=FapF/w8V6L5P4RP46nAQFrAdDN4jwAlxC54JDkAvfWE=; b=H2BVl81DZ+X6WTFpuKdzFBkj10EPes0dwqBz3sHbAmETDgjwSaOpbPRPYyGpJQMe6D xYmw3hhCEb/VbuXdKS7U2x0BE6ycNxHlXKOWVcrgAYvGtmNEHr8e4JIouZ++xeeOFUK/ gSWpjjA7SuOsTu38bUs3am5kEoXaePaaSNyTj36CL+4JhKcP3XKoGjY0KjQuPUuqozNT GjfbXpPbEpV4i8NCgMMIMbD0CM/cvmIfiXqRQb1uXamf+sM5hiWAQPnHkNnaykbc/pRZ YW6MM0MllaZ98my08ZdTZCX56ZrIJhHA12xjhrvZQHBzOVBgaN9u55+VCR8u4pyhRVBF K6pg== X-Gm-Message-State: APjAAAX8piPZLSwzhowggub8NS2v7ULvonlNv/jghMNaI69wwD03t7pJ 0tCrn8CM9ft868o13v6A1mYKsL8Tx3w= X-Received: by 2002:a37:9d93:: with SMTP id g141mr427405qke.188.1568752243366; Tue, 17 Sep 2019 13:30:43 -0700 (PDT) Received: from qcai.nay.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id 139sm1822874qkf.14.2019.09.17.13.30.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Sep 2019 13:30:42 -0700 (PDT) From: Qian Cai To: akpm@linux-foundation.org Cc: rientjes@google.com, cl@linux.com, penberg@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Qian Cai Subject: [PATCH] mm/slub: fix -Wunused-function compiler warnings Date: Tue, 17 Sep 2019 16:30:32 -0400 Message-Id: <1568752232-5094-1-git-send-email-cai@lca.pw> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Qian Cai --- mm/slub.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/slub.c b/mm/slub.c index 8834563cdb4b..49739f005b4f 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) { -- 1.8.3.1