Message ID | 20230319220008.2138576-14-rppt@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp901271wrt; Sun, 19 Mar 2023 15:29:05 -0700 (PDT) X-Google-Smtp-Source: AK7set+rqn/W1WubF8zXY9NfqPbE5ZiSpW8oJQuXCkMLn9JCTFv8YP4zZkjdGqaVsyTnmJ+cgKzl X-Received: by 2002:a17:90b:33c2:b0:23f:7843:93ed with SMTP id lk2-20020a17090b33c200b0023f784393edmr7090668pjb.8.1679264945280; Sun, 19 Mar 2023 15:29:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679264945; cv=none; d=google.com; s=arc-20160816; b=hLUUiUPwO780zX2LT0P7iBMjU1fP3uvIiaa2zvqwEaOM6rVh/HXz7EnQUydxMidnFI 0u5BCDl764SCveF0I7GOBA4Yf3GbFFf9s/4aW0dMXCKI2GjKCwXw0AWptWxgtxkJspwv TFgHg0nGLIHPZBvG+yjeZcXyJppLOjXE+4C9gtJP+AFmvhQA10Pg6pFrBlmVNwtyYutS 9g/N9pFCKEFQsTr8iTO6rhw4ejn+TjPyFzR/LwULVZtMfzX3VdrE9u2C4c689xBjENjI YIsmxYTkwOSqs3HCRj3bfmOQAjQ9FqJ4ZnKGUSXlEe5+8P9Cc5jT6dKLNo0JsxCqEnir KBEw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AvGyKfsisscgtbAEHKoU+lyYUhws0/Tai9b1Eed9JZY=; b=ncdRWrRL1QTUiNcsTK+GPeFYYYSYc+hdoSmfDKdA3eYwDRKEOJT2rugOyk59LY+yeX D2pDqp4yJH39CV2RcDOfctZfUw0XopA/CXP6Zfgg/ASfXFZM/+bVRNAAu+qUW5MjDty2 8+bEy5mOKq5L9MSvNVKc3S+iwIisFY03XqD297n2M1XuPwKcncx+n0tnquBO95q+Nty5 MavBGVcAFvJaz7+iiYzoNAy5JlE+Az5zTD8FgN5FhuV2TBKM5AlRbq0glb5jSS5XYE1Q pRZLN+yKwjc0/l3f1goysnM12oDn2bLWoP0IVaMC8Svwftqa10owmtHrdSXAAF5MIcwH pENQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dj21oSvT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gx19-20020a17090b125300b002332c17dbfbsi14182637pjb.70.2023.03.19.15.28.53; Sun, 19 Mar 2023 15:29:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dj21oSvT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230289AbjCSWCb (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Sun, 19 Mar 2023 18:02:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230234AbjCSWB7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 19 Mar 2023 18:01:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CEE11D93B; Sun, 19 Mar 2023 15:01:11 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 1A082611D2; 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 <rppt@kernel.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: David Hildenbrand <david@redhat.com>, Matthew Wilcox <willy@infradead.org>, Mel Gorman <mgorman@suse.de>, Michal Hocko <mhocko@kernel.org>, Mike Rapoport <rppt@kernel.org>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, Vlastimil Babka <vbabka@suse.cz>, 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760836919532997435?= X-GMAIL-MSGID: =?utf-8?q?1760836919532997435?= |
Series |
mm: move core MM initialization to mm/mm_init.c
|
|
Commit Message
Mike Rapoport
March 19, 2023, 10 p.m. UTC
From: "Mike Rapoport (IBM)" <rppt@kernel.org> 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) <rppt@kernel.org> --- include/linux/slab.h | 1 - mm/mm_init.c | 1 + mm/slab.h | 1 + 3 files changed, 2 insertions(+), 1 deletion(-)
Comments
On 19.03.23 23:00, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" <rppt@kernel.org> > > 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) <rppt@kernel.org> > --- Reviewed-by: David Hildenbrand <david@redhat.com>
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 <linux/swap.h> #include <linux/cma.h> #include "internal.h" +#include "slab.h" #include "shuffle.h" #include <asm/setup.h> 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 {