From: "Zi Yan" <ziy@nvidia.com>
To: "ran xiaokai" <ranxiaokai627@163.com>
Cc: <yang.yang29@zte.com.cn>, <si.hao@zte.com.cn>,
<akpm@linux-foundation.org>, <baohua@kernel.org>,
<linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-mm@kvack.org>, <peterx@redhat.com>,
<ran.xiaokai@zte.com.cn>, <ryan.roberts@arm.com>,
<svetly.todorov@memverge.com>, <vbabka@suse.cz>,
<willy@infradead.org>
Subject: Re: [PATCH 1/2] mm: Constify folio_order()/folio_test_pmd_mappable()
Date: Wed, 26 Jun 2024 07:19:10 -0400 [thread overview]
Message-ID: <D29WP4G2ZWDB.WBZKGKDS93LH@nvidia.com> (raw)
In-Reply-To: <20240626043010.1156065-1-ranxiaokai627@163.com>
[-- Attachment #1: Type: text/plain, Size: 1461 bytes --]
On Wed Jun 26, 2024 at 12:30 AM EDT, ran xiaokai wrote:
> > On Tue Jun 25, 2024 at 10:49 PM EDT, ran xiaokai wrote:
> > > From: Ran Xiaokai <ran.xiaokai@zte.com.cn>
> > >
> > > Constify folio_order()/folio_test_pmd_mappable().
> > > No functional changes, just a preparation for the next patch.
> >
> > What warning/error are you seeing when you just apply patch 2? I wonder why it
> > did not show up in other places. Thanks.
>
> fs/proc/page.c: In function 'stable_page_flags':
> fs/proc/page.c:152:35: warning: passing argument 1 of 'folio_test_pmd_mappable' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> 152 | else if (folio_test_pmd_mappable(folio)) {
> | ^~~~~
> In file included from include/linux/mm.h:1115,
> from include/linux/memblock.h:12,
> from fs/proc/page.c:2:
> include/linux/huge_mm.h:380:58: note: expected 'struct folio *' but argument is of type 'const struct folio *'
> 380 | static inline bool folio_test_pmd_mappable(struct folio *folio)
>
> u64 stable_page_flags(const struct page *page)
> {
> const struct folio *folio; // the const definition causes the warning
> ...
Please include the warning in the commit log to explain the change.
> }
>
> As almost all the folio_test_XXX(flags) have converted to received
> a const parameter, it is Ok to also do this for folio_order()?
Yes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 854 bytes --]
next prev parent reply other threads:[~2024-06-26 11:19 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 2:49 [PATCH 0/2] kpageflags: fix wrong KPF_THP on non-pmd-mappable compound pages ran xiaokai
2024-06-26 2:49 ` [PATCH 1/2] mm: Constify folio_order()/folio_test_pmd_mappable() ran xiaokai
2024-06-26 3:09 ` Zi Yan
2024-06-26 4:30 ` ran xiaokai
2024-06-26 11:19 ` Zi Yan [this message]
2024-06-26 2:49 ` [PATCH 2/2] kpageflags: fix wrong KPF_THP on non-pmd-mappable compound pages ran xiaokai
2024-06-26 3:06 ` Zi Yan
2024-06-26 4:32 ` ran xiaokai
2024-06-26 11:07 ` Ryan Roberts
2024-06-26 14:40 ` Zi Yan
2024-06-26 14:42 ` Ryan Roberts
2024-06-27 1:54 ` Lance Yang
2024-06-27 4:10 ` Barry Song
2024-06-27 8:39 ` Ryan Roberts
2024-06-27 9:16 ` Barry Song
2024-06-27 9:27 ` Ryan Roberts
2024-06-27 12:46 ` ran xiaokai
2024-06-26 15:15 ` Matthew Wilcox
2024-06-26 15:18 ` Ryan Roberts
2024-06-27 2:07 ` Lance Yang
2024-06-26 15:55 ` kernel test robot
2024-06-26 16:21 ` kernel test robot
2024-06-27 12:38 ` ran xiaokai
2024-06-27 13:03 ` Zi Yan
2024-06-27 13:16 ` ran xiaokai
2024-06-27 13:54 ` David Hildenbrand
2024-06-28 3:01 ` ran xiaokai
2024-07-03 9:20 ` ran xiaokai
2024-07-03 10:11 ` David Hildenbrand
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=D29WP4G2ZWDB.WBZKGKDS93LH@nvidia.com \
--to=ziy@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterx@redhat.com \
--cc=ran.xiaokai@zte.com.cn \
--cc=ranxiaokai627@163.com \
--cc=ryan.roberts@arm.com \
--cc=si.hao@zte.com.cn \
--cc=svetly.todorov@memverge.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=yang.yang29@zte.com.cn \
/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 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.