From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87F9BC47094 for ; Mon, 31 May 2021 03:36:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5EFDF6100A for ; Mon, 31 May 2021 03:36:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230078AbhEaDgD (ORCPT ); Sun, 30 May 2021 23:36:03 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:2796 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229952AbhEaDgB (ORCPT ); Sun, 30 May 2021 23:36:01 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Ftgl9125KzWq6W; Mon, 31 May 2021 11:29:41 +0800 (CST) Received: from dggpemm500004.china.huawei.com (7.185.36.219) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 31 May 2021 11:34:21 +0800 Received: from [10.174.177.91] (10.174.177.91) by dggpemm500004.china.huawei.com (7.185.36.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 31 May 2021 11:34:20 +0800 Subject: Re: [PATCH -next] mm/mmap_lock: fix warning when CONFIG_TRACING is not defined To: Matthew Wilcox CC: , , References: <20210531015527.49785-1-cuibixuan@huawei.com> From: Bixuan Cui Message-ID: Date: Mon, 31 May 2021 11:34:19 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.91] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500004.china.huawei.com (7.185.36.219) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/5/31 10:02, Matthew Wilcox wrote: >> Fix the warning: [-Wunused-function] >> mm/mmap_lock.c:157:20: warning: ‘get_mm_memcg_path’ defined but not used >> static const char *get_mm_memcg_path(struct mm_struct *mm) >> ^~~~~~~~~~~~~~~~~ > That seems like the wrong way to fix the warning. Why not put it > under an appropriate ifdef? It's better than me, I will send a new patch. Thanks Bixuan Cui >