From patchwork Fri Jan 14 22:08:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12714120 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 AAB53C433EF for ; Fri, 14 Jan 2022 22:08:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3AB786B013D; Fri, 14 Jan 2022 17:08:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 35BF76B013F; Fri, 14 Jan 2022 17:08:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 223D86B0140; Fri, 14 Jan 2022 17:08:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0070.hostedemail.com [216.40.44.70]) by kanga.kvack.org (Postfix) with ESMTP id 13DC46B013D for ; Fri, 14 Jan 2022 17:08:12 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id C31881826B6C5 for ; Fri, 14 Jan 2022 22:08:11 +0000 (UTC) X-FDA: 79030281582.28.BC10459 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf29.hostedemail.com (Postfix) with ESMTP id 1F61E120012 for ; Fri, 14 Jan 2022 22:08:10 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C0527B825F5; Fri, 14 Jan 2022 22:08:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 445A8C36AEC; Fri, 14 Jan 2022 22:08:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1642198088; bh=x52Bihfq2g5s2vzRz3Ir1EyXlJtuNlkVDsMtcn41xeg=; h=Date:From:To:Subject:In-Reply-To:From; b=Ww7nwi0PBsyPfFbjx6TJtIBrqIVetFAznEfK7NFE772iF0VbC2gouXh2JrvgTHGCz 6KcvY7lVgf73JcTG7Gr9H284wAoKZpeOWkt0Y3TdyKW5jFNdk4vifyWRWnBFGj6SAN gK47Coinl41Nh1Yc2DsaqRTFV/+AyJUcOTn/wqYE= Date: Fri, 14 Jan 2022 14:08:07 -0800 From: Andrew Morton To: akpm@linux-foundation.org, david@redhat.com, ligang.bdlg@bytedance.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, songmuchun@bytedance.com, torvalds@linux-foundation.org Subject: [patch 094/146] vmscan: make drop_slab_node static Message-ID: <20220114220807.RmWYbLa8H%akpm@linux-foundation.org> In-Reply-To: <20220114140222.6b14f0061194d3200000c52d@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 1F61E120012 X-Stat-Signature: ngdk165d4c3satfa6n9ije4ufu89z148 Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=Ww7nwi0P; spf=pass (imf29.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-HE-Tag: 1642198090-3485 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: From: Gang Li Subject: vmscan: make drop_slab_node static drop_slab_node is only used in drop_slab. So remove it's declaration from header file and add keyword static for it's definition. Link: https://lkml.kernel.org/r/20211111062445.5236-1-ligang.bdlg@bytedance.com Signed-off-by: Gang Li Reviewed-by: David Hildenbrand Reviewed-by: Muchun Song Signed-off-by: Andrew Morton --- include/linux/mm.h | 1 - mm/vmscan.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) --- a/include/linux/mm.h~vmscan-make-drop_slab_node-static +++ a/include/linux/mm.h @@ -3122,7 +3122,6 @@ int drop_caches_sysctl_handler(struct ct #endif void drop_slab(void); -void drop_slab_node(int nid); #ifndef CONFIG_MMU #define randomize_va_space 0 --- a/mm/vmscan.c~vmscan-make-drop_slab_node-static +++ a/mm/vmscan.c @@ -951,7 +951,7 @@ out: return freed; } -void drop_slab_node(int nid) +static void drop_slab_node(int nid) { unsigned long freed; int shift = 0;