From patchwork Sun Mar 26 16:02:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13188345 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 16E56C74A5B for ; Sun, 26 Mar 2023 16:02:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 738ED6B0072; Sun, 26 Mar 2023 12:02:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6E92B6B0074; Sun, 26 Mar 2023 12:02:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B1AD6B0075; Sun, 26 Mar 2023 12:02:34 -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 4DE9E6B0072 for ; Sun, 26 Mar 2023 12:02:34 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 18E41A0422 for ; Sun, 26 Mar 2023 16:02:33 +0000 (UTC) X-FDA: 80611517028.28.92DF362 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf28.hostedemail.com (Postfix) with ESMTP id 3C65EC0016 for ; Sun, 26 Mar 2023 16:02:31 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=qHDHGNkH; spf=pass (imf28.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=1679846551; 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:references:dkim-signature; bh=lT0+AArYKubkn1XM/DfMkG+SVnDtAqp52SSaf3AbZO0=; b=vXjQpM1Ma44+PbT6fsjn8hFUTC4t+4bvQDIXmeyMniE7182VaxmGRnJbbedM5dxlu7Pehq nVVpDfC0uDJldiyp3mIcTuHAUqdY8jCvmiTEO0nKNAbbNA1ClJGQrJEOCYUL3dGZmgqnD3 DP5BBpQdvYzH9n8n80fure60TAxMJuI= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=qHDHGNkH; spf=pass (imf28.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=1679846551; a=rsa-sha256; cv=none; b=GvwXvlpHBKg/jwP0HORgC0ekmzd9oFQVYy8jXMLxl25lOep2+i1wBTiATr5QviWE5VpnBr 3DdxApeYeOWSsXm4oeVQR88og3CMwG4VjcvoHMXGKPQjKI+P+eTrStpovOXGMZH1b/YtbO 1ywzKnvwkSP8ZMACREyNIso9/JY5M9U= 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 4FEF6B80B78; Sun, 26 Mar 2023 16:02:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73BC9C433EF; Sun, 26 Mar 2023 16:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679846548; bh=5GI+UWw52yzkDB1j5DJoxEVt+0WJ22Fk+zngw5zbp2U=; h=From:To:Cc:Subject:Date:From; b=qHDHGNkH/Bk3FiM4UUc3BsWI2eljV2UOe3Q1efpMYxYQexeDVTryU0WViuapsTxxE BicCNXRtjfb/NkoeQzBD0JwbBf7z3KWpklROvxUyWyFRTjkGjB+DI10Gtqo5KEJHcB nkvYuSf2lpz1wjEXxNpH519Bt8VHzcXF95vGQFlsBxchOZI1V/GVEzslNi/Xmbzlbd BK+Q91Ymies/cbC01ULtEAwLGXRKT8uy0w4kK76uZZN+FUFZPYw04R+WuscwJOZa8w pjLJqFFIdGq4kLNqVzeEkGrvXV+M4Mrqktf8Q7deeDpwU7zXMpLYOGiVS76wbSUVC/ /ThU0pG9V8crQ== From: Mike Rapoport To: Andrew Morton Cc: Matthew Wilcox , Mike Rapoport , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: move free_area_empty() to mm/internal.h Date: Sun, 26 Mar 2023 19:02:15 +0300 Message-Id: <20230326160215.2674531-1-rppt@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: 3C65EC0016 X-Stat-Signature: m7tn3c4n5o7rcq6s1hyyxwukcd9tguqb X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1679846551-712816 X-HE-Meta: U2FsdGVkX18TJHNGpxLvo9cWpvybpghFybqd3QlXkEhprVMCBOxe1Rqs7WTBZRgK1uUwo8rVnQ34nMA5L0e49egqz63exzTAgLXIN3Cgt7h0BY3UtiNxyr2CfITOzSDx736H2xqjYQihC086BzXsBnLUfalVCP3kytAFVmxXT99qVX07shIJkpB+z34Z6XBL4+0VvJb46w7yQwOUfJJQA3eVGFofYE+OHHI43hdUdcxaDPC/aMZUSdGv3cHuCaujqXxGtRMLmQRcY5w2Hlq0XtLeOVg84fL7L5tETN9HHz9NhjH2lmraoNpJwZVo1UxS07//0apa0gUPeF9rS50yzYEUBbERYq5azrs7fGy69NjIJ5wZczqBWDCcdXw7QX+oc00QMtfrmF6f6SaIjPsgc2pyMb5sCs6RgMP2MJzOrCg3baqIavkC5BetQ+x2dUI8EhHhTuLXsZaUduECbBVEUEPCl1Ygsx1tjElShh+Vcc5H3lI3pQip74fiI3HrRtYKFsrvPi7WFtWYlax7zg/aEJrdDJ2IL/Cdvzl1EYTvaekWNsxEf4f4h/UOfEiucyzwZ3dxl4551YyvB2GfjtO7bxQr9oM/XyHuScFBm7iu27UrNeL8rrL2BtCJHJ9K8qYeynwL9ZtsCxmM2AAP9CyMYCqNFO3lp/fj+m5Uh3lQqQGNAi43A8xx4ycYSPRamQTzS5N9JS7k8P2VNejQxc+lKaZQl/J4yjbLYlMxc180P85PhQhDB5s/lX8N20V9iSM+LUSZjY+IhHRymLuuHQrDLCv74nMisz9SwZhxSyl0ws7dtzuMRqiE2yeOKnHDy50x4mUHyao5WWzJ7ivbnwdWXLXpC+9BfO7vhhvD8vsSggZzs1gcDss2ohNvY4jmtfrvaJ4M/SPwygU7B7iIJFmNRxVkfTDrhvGdXXYXWUDBZqYBzNr8FxX7OLqyIMbZidHQaId1dI5rGBnTaybpnR2 fPoG3z7u nG23orS9jEwV5zCZzj4/hQHOMLtfywNbP/mNrJB8Wjc7NShTbmvom9jjt+FpIq8kEX6cQwQUyBqW2mit4l9dTvZnE6w9tGEqjzsNTPiJouQhIws2q9Xi98+QR57yXx2vngmM5CwnClIkpFDMRZYJAJO60jNvOX0bjVW7bMBGHdzGIdotKVAht1867JYzH6ywKzKJS9fxEI+gUxPyENrfqh6+bNmuEACx8NqZLKh6RFEZ2Cu7SNGDUX3iQpOoFFY45kClMBKmHfdjFgEvmNcyZPly49w== 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)" The free_area_empty() helper is only used inside mm/ so move it there to reduce noise in include/linux/mmzone.h Suggested-by: Matthew Wilcox (Oracle) Signed-off-by: Mike Rapoport (IBM) --- include/linux/mmzone.h | 5 ----- mm/internal.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) base-commit: 51551d71edbc998fd8c8afa7312db3d270f5998e diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 72837e019bd1..3ccada5e8799 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -110,11 +110,6 @@ struct free_area { unsigned long nr_free; }; -static inline bool free_area_empty(struct free_area *area, int migratetype) -{ - return list_empty(&area->free_list[migratetype]); -} - struct pglist_data; #ifdef CONFIG_NUMA diff --git a/mm/internal.h b/mm/internal.h index c05ad651b515..18cda26b8a92 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -517,6 +517,11 @@ void init_cma_reserved_pageblock(struct page *page); int find_suitable_fallback(struct free_area *area, unsigned int order, int migratetype, bool only_stealable, bool *can_steal); +static inline bool free_area_empty(struct free_area *area, int migratetype) +{ + return list_empty(&area->free_list[migratetype]); +} + /* * These three helpers classifies VMAs for virtual memory accounting. */