mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baokun Li <libaokun1@huawei.com>
To: Zhang Yi <yi.zhang@huaweicloud.com>
Cc: <linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<tytso@mit.edu>, <adilger.kernel@dilger.ca>, <jack@suse.cz>,
	<ojaswin@linux.ibm.com>, <sfr@canb.auug.org.au>,
	<yi.zhang@huawei.com>, <yukuai3@huawei.com>,
	<yangerkun@huawei.com>, <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH -next] ext4: fix the compile error of EXT4_MAX_PAGECACHE_ORDER macro
Date: Tue, 15 Jul 2025 11:36:11 +0800	[thread overview]
Message-ID: <1f12e3ed-ad0e-4ca7-b26e-de7a7ac3a737@huawei.com> (raw)
In-Reply-To: <20250715031203.2966086-1-yi.zhang@huaweicloud.com>

On 2025/7/15 11:12, Zhang Yi wrote:
> From: Zhang Yi <yi.zhang@huawei.com>
>
> Since both the input and output parameters of the
> EXT4_MAX_PAGECACHE_ORDER should be unsigned int type, switch to using
> umin() instead of min(). This will silence the compile error reported by
> _compiletime_assert() on powerpc.
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Closes: https://lore.kernel.org/all/20250715082230.7f5bcb1e@canb.auug.org.au/
> Signed-off-by: Zhang Yi <yi.zhang@huawei.com>

Looks good. Feel free to add:

Reviewed-by: Baokun Li <libaokun1@huawei.com>

> ---
>   fs/ext4/inode.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 1bce9ebaedb7..6fd3692c4faf 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -5204,7 +5204,7 @@ static bool ext4_should_enable_large_folio(struct inode *inode)
>    * where the PAGE_SIZE exceeds 4KB.
>    */
>   #define EXT4_MAX_PAGECACHE_ORDER(i)		\
> -		min(MAX_PAGECACHE_ORDER, (11 + (i)->i_blkbits - PAGE_SHIFT))
> +		umin(MAX_PAGECACHE_ORDER, (11 + (i)->i_blkbits - PAGE_SHIFT))
>   void ext4_set_inode_mapping_order(struct inode *inode)
>   {
>   	if (!ext4_should_enable_large_folio(inode))



  reply	other threads:[~2025-07-15  3:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15  3:12 Zhang Yi
2025-07-15  3:36 ` Baokun Li [this message]
2025-07-15  4:06 ` Theodore Ts'o
2025-07-15 12:52   ` Zhang Yi

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=1f12e3ed-ad0e-4ca7-b26e-de7a7ac3a737@huawei.com \
    --to=libaokun1@huawei.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojaswin@linux.ibm.com \
    --cc=sfr@canb.auug.org.au \
    --cc=tytso@mit.edu \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=yi.zhang@huaweicloud.com \
    --cc=yukuai3@huawei.com \
    /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

all inboxes | Powered by JetHome®