From: Junjie Fu <fujunjie1@qq.com>
To: SeongJae Park <sj@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
willy@infradead.org, Michal Hocko <mhocko@suse.com>,
akpm@linux-foundation.org, gourry@gourry.net, fujunjie1@qq.com
Subject: Re: [PATCH] mempolicy.h: Remove unnecessary header file inclusions
Date: Sun, 8 Dec 2024 21:50:06 +0800 [thread overview]
Message-ID: <tencent_C722D2FCAA87D408E78D8E452E17C6F3B906@qq.com> (raw)
In-Reply-To: <20241207195341.279560-1-sj@kernel.org>
On December 8, 2024 at 3:53, SeongJae Park wrote:
> I noticed kunit UM build errors as below on mm-unstable, and git bisect points
> this patch.
>
> $ ./tools/testing/kunit/kunit.py run --kunitconfig ./mm/damon/tests/
> [...]
> fs/aio.c:525:71: error: ‘FGP_CREAT’ undeclared (first use in this function); did you mean ‘IPC_CREAT’?
> 525 | FGP_LOCK | FGP_ACCESSED | FGP_CREAT,
> | ^~~~~~~~~
> | IPC_CREAT
> fs/aio.c:532:17: error: implicit declaration of function ‘folio_end_read’; did you mean ‘folio_test_head’? [-Werror=implicit-function-declaration]
> 532 | folio_end_read(folio, true);
> | ^~~~~~~~~~~~~~
> | folio_test_head
> [...]
>
> I also confirmed including pagemap.h on fs/aio.c as below fixes the issue. I
> would like to hear you or others opinions though, since I'm not familiar with
> the inclusion routes of the file.
Including unnecessary header files in a .h file is not a good practice.
It can lead to troublesome dependency issues in the future. However,
based on the testing on your side, this change might cause some other
compilation issues, as indicated in your patch. I think all these issues
should be resolvable by including the pagemap.h in the .c files instead.
prev parent reply other threads:[~2024-12-08 13:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-06 15:53 Junjie Fu
2024-12-07 6:00 ` Andrew Morton
2024-12-07 8:14 ` [PATCH] mm/mempolicy.c: include pagemap.h directly Junjie Fu
2024-12-07 17:14 ` Matthew Wilcox
2024-12-07 18:22 ` [PATCH] mm/mempolicy.c: include pagemap.h directly in right place Junjie Fu
2024-12-07 19:53 ` [PATCH] mempolicy.h: Remove unnecessary header file inclusions SeongJae Park
2024-12-07 21:55 ` Matthew Wilcox
2024-12-08 13:50 ` Junjie Fu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_C722D2FCAA87D408E78D8E452E17C6F3B906@qq.com \
--to=fujunjie1@qq.com \
--cc=akpm@linux-foundation.org \
--cc=gourry@gourry.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=sj@kernel.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox