Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2595859rdb; Fri, 22 Sep 2023 03:25:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/HUPWzE6XO3x8RHgxcSHmqxYwMfO0EBLhobf8KRb3xv+wtSxtmVP/FYHq6q6h20oVhmps X-Received: by 2002:a05:6358:429e:b0:135:6d9:2399 with SMTP id s30-20020a056358429e00b0013506d92399mr7767593rwc.30.1695378331215; Fri, 22 Sep 2023 03:25:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695378331; cv=none; d=google.com; s=arc-20160816; b=PAmev+sIrJfs38evVielEECn1nNB3CPR7CWeoIzYRnz4aFp1MTn/3Q9++rsLlue1kU TiLKo6MLvFxWLE/PICUaTqSE0pWERmRmccX71eSnmb614ZaeiD7cD6Muc1gySCGl0/00 F48QLiXjpW5III+R2YJ6u/W2IkTtGHE1QDEmun5brmgJvOoH8k2tPUC8+1ccEodF7xCv C5p07lKLLJDpAZ4FopAkZGH5sHdKYDbtzMvam9fEAT+WsxMa916I/qfySsiwjzQXSBWb MgpooxHgsaD5wBvwllF59KQjSAxEYsIdxoqzDVJD9tL4bvgPv4jzNIudAENa2fGGpOQT X5YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=aZFXVjXPEOOS8bf8KQF9DqY4JHI2zwJ7+3DN+vMNIcE=; fh=l079960hpVPLLLVUoeI37asO6MgykqGulxbRYLiPwy0=; b=eOvEIeH3eCGK4r3XqGM4Skn7dFfnpqhkM4JQrWoGOauqgl+oPKsuICmuGkt2enthwL 43ak487ix0qWIdHpNBtrKzex4iimA04w7gbSRoN4Uj7W5op78LmRqPmerjcLK+sLNX0q Nz0xxc4QAz5huAwe6FQ/72p+P269ZOGpj0WDzk5EtVXJ0wpzfIVREIV4GzCzWNz1TfzS 6+RUhd/4VBNMJ5HQ4SaV3tcmA3m13Bjfvuxs1arnW3jOs/4fbh5sI9XidNcoICHGImqf vUPfucc6C2Ec19V6SeH8GD0NZ/lfjWEBh/LDIFaj6vd+FrZKyeF7v6/kEmlsdD03enjT d/Og== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id k63-20020a636f42000000b00577a519621bsi3397379pgc.231.2023.09.22.03.25.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 03:25:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 728888113EF5; Fri, 22 Sep 2023 03:08:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233186AbjIVKIK (ORCPT + 99 others); Fri, 22 Sep 2023 06:08:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233185AbjIVKIJ (ORCPT ); Fri, 22 Sep 2023 06:08:09 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 481D3CE for ; Fri, 22 Sep 2023 03:08:02 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0Vsd76ZS_1695377268; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0Vsd76ZS_1695377268) by smtp.aliyun-inc.com; Fri, 22 Sep 2023 18:07:59 +0800 From: Jiapeng Chong To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] mm/list_lru: Remove unused function Date: Fri, 22 Sep 2023 18:07:47 +0800 Message-Id: <20230922100747.17045-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 22 Sep 2023 03:08:13 -0700 (PDT) The function are defined in the list_lru.c file, but not called elsewhere, so delete the unused function. mm/list_lru.c:64:1: warning: unused function 'list_lru_from_kmem'. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=6677 Signed-off-by: Jiapeng Chong --- mm/list_lru.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/mm/list_lru.c b/mm/list_lru.c index 37c5c2ef6c0e..800f171d2c23 100644 --- a/mm/list_lru.c +++ b/mm/list_lru.c @@ -60,27 +60,6 @@ list_lru_from_memcg_idx(struct list_lru *lru, int nid, int idx) return &lru->node[nid].lru; } -static inline struct list_lru_one * -list_lru_from_kmem(struct list_lru *lru, int nid, void *ptr, - struct mem_cgroup **memcg_ptr) -{ - struct list_lru_node *nlru = &lru->node[nid]; - struct list_lru_one *l = &nlru->lru; - struct mem_cgroup *memcg = NULL; - - if (!list_lru_memcg_aware(lru)) - goto out; - - memcg = mem_cgroup_from_slab_obj(ptr); - if (!memcg) - goto out; - - l = list_lru_from_memcg_idx(lru, nid, memcg_kmem_id(memcg)); -out: - if (memcg_ptr) - *memcg_ptr = memcg; - return l; -} #else static void list_lru_register(struct list_lru *lru) { @@ -105,15 +84,6 @@ list_lru_from_memcg_idx(struct list_lru *lru, int nid, int idx) { return &lru->node[nid].lru; } - -static inline struct list_lru_one * -list_lru_from_kmem(struct list_lru *lru, int nid, void *ptr, - struct mem_cgroup **memcg_ptr) -{ - if (memcg_ptr) - *memcg_ptr = NULL; - return &lru->node[nid].lru; -} #endif /* CONFIG_MEMCG_KMEM */ bool list_lru_add(struct list_lru *lru, struct list_head *item) -- 2.20.1.7.g153144c