Re: [PATCH] mm: remove duplicate mm_types.h and unnecessary declare

From: Andrew Morton
Date: Sun Aug 14 2022 - 20:17:57 EST


On Wed, 27 Jul 2022 23:15:27 +0800 Chao Xu <Chao.Xu9@xxxxxxxxxxxxx> 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.