Linux filesystem development
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Jinjiang Tu <tujinjiang@huawei.com>,
	akpm@linux-foundation.org, ziy@nvidia.com, luizcap@redhat.com,
	willy@infradead.org, linmiaohe@huawei.com,
	svetly.todorov@memverge.com, xu.xin16@zte.com.cn,
	chengming.zhou@linux.dev, linux-fsdevel@vger.kernel.org,
	linux-mm@kvack.org
Cc: wangkefeng.wang@huawei.com, sunnanyong@huawei.com
Subject: Re: [PATCH 1/2] fs: stable_page_flags(): use BIT_ULL() for KPF flags
Date: Thu, 2 Jul 2026 15:10:05 +0200	[thread overview]
Message-ID: <6b3f552d-5e63-46f6-bbae-74343848025d@kernel.org> (raw)
In-Reply-To: <20260702110614.2176986-2-tujinjiang@huawei.com>

On 7/2/26 13:06, Jinjiang Tu wrote:
> The stable_page_flags() function currently sets page flag bits using
> "1 << KPF_xxx" for various KPF_* definitions. KPF_* may be larger than 32,
> which will trigger -Wshift-count-overflow warning. All KPF_* values
> currently used in "1 << KPF_xxx" are smaller than 33, so no warning is
> triggered with current code. However, the later patch will cleanup
> stable_page_flags() and "1 << KPF_xxx" will be used for KPF_* values larger
> than 32, such as KPF_MLOCKED.
> 
> Replace all occurrences of "1 << KPF_*" with the BIT_ULL() macro to
> ensure all shifts are performed on a 64-bit unsigned type. This makes
> the code robust, and safe for future extension.
> 
> No functional change is intended.
> 
> Signed-off-by: Jinjiang Tu <tujinjiang@huawei.com>
> ---

Yes, looks cleaner.

Acked-by: David Hildenbrand (Arm) <david@kernel.org>

-- 
Cheers,

David

  reply	other threads:[~2026-07-02 13:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-02 11:06 [PATCH 0/2] fs: stable_page_flags(): use folio_test_*() helpers Jinjiang Tu
2026-07-02 11:06 ` [PATCH 1/2] fs: stable_page_flags(): use BIT_ULL() for KPF flags Jinjiang Tu
2026-07-02 13:10   ` David Hildenbrand (Arm) [this message]
2026-07-02 14:32   ` [PATCH 1/2] " Zi Yan
2026-07-02 11:06 ` [PATCH 2/2] fs: stable_page_flags(): use folio_test_*() helpers Jinjiang Tu
2026-07-10  3:52   ` Jinjiang Tu
2026-07-10 11:29   ` David Hildenbrand (Arm)
2026-07-02 12:03 ` [PATCH 0/2] " David Hildenbrand (Arm)
2026-07-03  3:00   ` Jinjiang Tu

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=6b3f552d-5e63-46f6-bbae-74343848025d@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=chengming.zhou@linux.dev \
    --cc=linmiaohe@huawei.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luizcap@redhat.com \
    --cc=sunnanyong@huawei.com \
    --cc=svetly.todorov@memverge.com \
    --cc=tujinjiang@huawei.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=willy@infradead.org \
    --cc=xu.xin16@zte.com.cn \
    --cc=ziy@nvidia.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