From patchwork Sun Mar 19 22:00:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13180642 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 A54A1C76195 for ; Sun, 19 Mar 2023 22:01:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 44265900010; Sun, 19 Mar 2023 18:01:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3CB97900002; Sun, 19 Mar 2023 18:01:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 29328900010; Sun, 19 Mar 2023 18:01:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 17AE6900002 for ; Sun, 19 Mar 2023 18:01:14 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id E6BDBA0207 for ; Sun, 19 Mar 2023 22:01:13 +0000 (UTC) X-FDA: 80587019226.16.2AE3A24 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf14.hostedemail.com (Postfix) with ESMTP id 0679C100029 for ; Sun, 19 Mar 2023 22:01:11 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=dj21oSvT; spf=pass (imf14.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1679263272; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=AvGyKfsisscgtbAEHKoU+lyYUhws0/Tai9b1Eed9JZY=; b=T9TbfOiL/XWr0rEfYLdvFsy4gsloIP0ebkYnvQxE09yK9doqkgQzODBtwFurfINOz4I4PE eJCD24jhauvfWxihWFHuM0eyyumgOrzE+XcdFo5LT25WlGufhVl/Mp6dItiDwTAvRHlE/X ItmrRJ6Qn/n52RE52xmPfZYR5gS1k80= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=dj21oSvT; spf=pass (imf14.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1679263272; a=rsa-sha256; cv=none; b=M9ASQa8zmZRHCywKSeCx4Z6KW4F7MANOdSiGE9qh0kVPXIng8SoaYbNCc2RIAAppwC0Oy3 O06jj6PYA3Yv8ZrrO6j9e5lvoUQ3BdbfXZ9HL+7Ew65HFxXaVapIR7DF//MMzWWCLcHLu8 9RdQxgwVURb+BxlesHCsyp3TXoz7CMA= 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 B4924B80D30; Sun, 19 Mar 2023 22:01:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A5F9C4339C; Sun, 19 Mar 2023 22:01:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679263269; bh=5aEejQ7EtQqthblpiGHnkd6ifM5j2LwwZNCKwxJWY2E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dj21oSvT9z3Ed9zQIOuVK5nwGGD/EqvV3Ixx7fZIDmTRlNnvvymwFxLdN5KS3CH8q HhMFUzoMLbKZVndGPuSqJws8OHtUTpsZ9y58wSjxo6Oes/hMdNBSkYmU2PprTeM6IY L0T2LHC76nu/Jf7wcAlQm8TrrzbbBtCC+k0KaMLeLH8c9syUdRBiCmhAfOQb2BeTJA nEKy78SUkn77LVx3EeUxphJS8tyk9/Qa6akui/E05DL/u7ZY60jAP5R2NT725QsSk+ 4lTdsTiMaMrCi8nhfQgQmSe0DKpKsElEDrQ/GzdER+v3axyyhzfi3QjSy3TIZF5JLB TLU2fUa0TYLUg== From: Mike Rapoport To: Andrew Morton Cc: David Hildenbrand , Matthew Wilcox , Mel Gorman , Michal Hocko , Mike Rapoport , Thomas Bogendoerfer , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 13/15] mm: move kmem_cache_init() declaration to mm/slab.h Date: Mon, 20 Mar 2023 00:00:06 +0200 Message-Id: <20230319220008.2138576-14-rppt@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230319220008.2138576-1-rppt@kernel.org> References: <20230319220008.2138576-1-rppt@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 0679C100029 X-Stat-Signature: zo8ncj5rnuaxfc7xnxjhihpbqd65kbsa X-Rspam-User: X-HE-Tag: 1679263271-56791 X-HE-Meta: U2FsdGVkX1+xSl2g/gdxRtIOwWEsUshRr6yN3inQ9dcbKqsd41kahV1uRQKVWBAYqxO48m9uGHUIm1hd+Ie3YI4DW9UDxr3m0w9mM85MV0FwGHalYsflsUmRdZwx2V0178R5i58KHCHZHVFb6ln46fXk1XDO9UHpMENqxIxLO63IMU0A+edyQ5z561RlvZeMDQY8xIoaxLN3YvlEJ4HGYSAVHfkaG+N4HDF/DlOOqteZmznf33/kmzgJWGpQUyyT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TG/i1/t4qXahjbeoHhXOWLyYUNANksUECbnpyrTkj7HDeQBnNMEahmu22LFn0TwjkhjUuusqIbIyU61EuJQJAMassODM9LYMJh8guw== 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: "Mike Rapoport (IBM)" kmem_cache_init() is called only from mm_core_init(), there is no need to declare it in include/linux/slab.h Move kmem_cache_init() declaration to mm/slab.h Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand --- include/linux/slab.h | 1 - mm/mm_init.c | 1 + mm/slab.h | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/slab.h b/include/linux/slab.h index aa4575ef2965..f8b1d63c63a3 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -167,7 +167,6 @@ struct mem_cgroup; /* * struct kmem_cache related prototypes */ -void __init kmem_cache_init(void); bool slab_is_available(void); struct kmem_cache *kmem_cache_create(const char *name, unsigned int size, diff --git a/mm/mm_init.c b/mm/mm_init.c index 73964449669e..78b2366e4407 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -27,6 +27,7 @@ #include #include #include "internal.h" +#include "slab.h" #include "shuffle.h" #include diff --git a/mm/slab.h b/mm/slab.h index 43966aa5fadf..3f8df2244f5a 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -4,6 +4,7 @@ /* * Internal slab definitions */ +void __init kmem_cache_init(void); /* Reuses the bits in struct page */ struct slab {