From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D166C7EE2A for ; Sat, 3 Jun 2023 03:27:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236800AbjFCD1T (ORCPT ); Fri, 2 Jun 2023 23:27:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229694AbjFCD1Q (ORCPT ); Fri, 2 Jun 2023 23:27:16 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 091BCE48 for ; Fri, 2 Jun 2023 20:27:15 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4QY4tZ3TbFz18LhR; Sat, 3 Jun 2023 11:22:30 +0800 (CST) Received: from [10.174.151.185] (10.174.151.185) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Sat, 3 Jun 2023 11:27:12 +0800 Subject: Re: [PATCH] mm: page_alloc: remove unneeded header files To: Andrew Morton CC: , References: <20230527100728.267992-1-linmiaohe@huawei.com> <20230530151306.b9f24b247c66ea7f80df6be8@linux-foundation.org> From: Miaohe Lin Message-ID: <5d4cfcb6-442e-1bfa-0a47-cd9db15361a0@huawei.com> Date: Sat, 3 Jun 2023 11:27:11 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20230530151306.b9f24b247c66ea7f80df6be8@linux-foundation.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.151.185] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/5/31 6:13, Andrew Morton wrote: > On Sat, 27 May 2023 18:07:28 +0800 Miaohe Lin wrote: > >> Remove some unneeded header files. No functional change intended. >> >> Signed-off-by: Miaohe Lin >> --- >> mm/page_alloc.c | 6 ------ >> 1 file changed, 6 deletions(-) >> >> diff --git a/mm/page_alloc.c b/mm/page_alloc.c >> index e671c747892f..beb6db613238 100644 >> --- a/mm/page_alloc.c >> +++ b/mm/page_alloc.c >> @@ -24,9 +24,7 @@ >> #include >> #include >> #include >> -#include > > This contains the prototype for print_modules(). So we're now reliant > upon module.h being included via some other header, which is fragile. Will keep it. > >> #include >> -#include >> #include >> #include >> #include >> @@ -36,8 +34,6 @@ >> #include >> #include >> #include >> -#include >> -#include >> #include >> #include >> #include >> @@ -52,11 +48,9 @@ >> #include >> #include >> #include >> -#include >> #include >> #include >> #include >> -#include > > Needed for do_div()? Will add it back. Depending on "asm/div64.h" being included via some other headers is fragile too. Many thanks for your comment.