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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1729C433F5 for ; Fri, 1 Apr 2022 06:17:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2F5906B0075; Fri, 1 Apr 2022 02:16:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2A5B96B0078; Fri, 1 Apr 2022 02:16:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 16CB06B007B; Fri, 1 Apr 2022 02:16:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 06F4B6B0075 for ; Fri, 1 Apr 2022 02:16:51 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id CA0AF60FEF for ; Fri, 1 Apr 2022 06:16:40 +0000 (UTC) X-FDA: 79307301360.05.4484929 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf26.hostedemail.com (Postfix) with ESMTP id C0F0514000C for ; Fri, 1 Apr 2022 06:16:39 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4KV8wH5g7xzBrvG; Fri, 1 Apr 2022 14:12:31 +0800 (CST) Received: from [10.174.177.76] (10.174.177.76) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 1 Apr 2022 14:16:36 +0800 Subject: Re: [PATCH] mm/slab: remove some unused functions To: , , , , , CC: , , References: <20220322091421.25285-1-linmiaohe@huawei.com> From: Miaohe Lin Message-ID: <98b76e35-0858-f097-7fa3-f3c816681a88@huawei.com> Date: Fri, 1 Apr 2022 14:16:36 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20220322091421.25285-1-linmiaohe@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.76] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: C0F0514000C X-Stat-Signature: a6pni8b5r17ejftn6iriipnkpyc67jrd Authentication-Results: imf26.hostedemail.com; dkim=none; spf=pass (imf26.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-Rspam-User: X-HE-Tag: 1648793799-526324 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2022/3/22 17:14, Miaohe Lin wrote: > alternate_node_alloc and ____cache_alloc_node are always called when > CONFIG_NUMA. So we can remove the unused !CONFIG_NUMA variant. Also > forward declaration for alternate_node_alloc is unnecessary. Remove > it too. > friendly ping. :) > Signed-off-by: Miaohe Lin > --- > mm/slab.c | 13 ------------- > 1 file changed, 13 deletions(-) > > diff --git a/mm/slab.c b/mm/slab.c > index d9dec7a8fd79..81301df47057 100644 > --- a/mm/slab.c > +++ b/mm/slab.c > @@ -619,18 +619,6 @@ static inline int cache_free_alien(struct kmem_cache *cachep, void *objp) > return 0; > } > > -static inline void *alternate_node_alloc(struct kmem_cache *cachep, > - gfp_t flags) > -{ > - return NULL; > -} > - > -static inline void *____cache_alloc_node(struct kmem_cache *cachep, > - gfp_t flags, int nodeid) > -{ > - return NULL; > -} > - > static inline gfp_t gfp_exact_node(gfp_t flags) > { > return flags & ~__GFP_NOFAIL; > @@ -639,7 +627,6 @@ static inline gfp_t gfp_exact_node(gfp_t flags) > #else /* CONFIG_NUMA */ > > static void *____cache_alloc_node(struct kmem_cache *, gfp_t, int); > -static void *alternate_node_alloc(struct kmem_cache *, gfp_t); > > static struct alien_cache *__alloc_alien_cache(int node, int entries, > int batch, gfp_t gfp) >