All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: remove duplicate mm_types.h and unnecessary declare
@ 2022-07-27 15:15 Chao Xu
  2022-08-15  0:17 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Chao Xu @ 2022-07-27 15:15 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, Chao Xu

mm_types.h have already in page-flags.h. Duplicated import
header file and struct page declare is not needed.

Signed-off-by: Chao Xu <Chao.Xu9@zeekrlife.com>
---
 include/linux/mmzone.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index aab70355d64f..4a20676c63f1 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -18,7 +18,6 @@
 #include <linux/pageblock-flags.h>
 #include <linux/page-flags-layout.h>
 #include <linux/atomic.h>
-#include <linux/mm_types.h>
 #include <linux/page-flags.h>
 #include <linux/local_lock.h>
 #include <asm/page.h>
@@ -1339,7 +1338,6 @@ struct mem_section_usage {

 void subsection_map_init(unsigned long pfn, unsigned long nr_pages);

-struct page;
 struct page_ext;
 struct mem_section {
        /*
--
2.17.1

免责声明:本邮件所包含信息发给指定个人或机构,邮件可能包含保密或专属信息。未经接收者许可,不得阅读、转发或传播邮件内容,或根据邮件内容采取任何相关行动。如果错误地收到了此邮件,请与收件人联系并自行删除邮件内容。

Disclaimer:The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error , please contact the sender and delete the material from any computer .

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm: remove duplicate mm_types.h and unnecessary declare
  2022-07-27 15:15 [PATCH] mm: remove duplicate mm_types.h and unnecessary declare Chao Xu
@ 2022-08-15  0:17 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2022-08-15  0:17 UTC (permalink / raw)
  To: Chao Xu; +Cc: linux-mm, linux-kernel

On Wed, 27 Jul 2022 23:15:27 +0800 Chao Xu <Chao.Xu9@zeekrlife.com> wrote:

> mm_types.h have already in page-flags.h. Duplicated import
> header file and struct page declare is not needed.

It's better to (as much as possible) explicitly include the needed headers,
rather than reply upon nested includes which might change in the future.

This isn't theoretical.  We regularly get build breakage when rework of
one header exposes unexpected dependencies within another file.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-15  0:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27 15:15 [PATCH] mm: remove duplicate mm_types.h and unnecessary declare Chao Xu
2022-08-15  0:17 ` Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.