From: Matthew Wilcox <willy@infradead.org>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: huge_memory: convert split_huge_pages_all() to use a folio
Date: Fri, 30 Dec 2022 08:14:33 +0000 [thread overview]
Message-ID: <Y66d6edbCgs6QgMj@casper.infradead.org> (raw)
In-Reply-To: <20221229122503.149083-1-wangkefeng.wang@huawei.com>
On Thu, Dec 29, 2022 at 08:25:03PM +0800, Kefeng Wang wrote:
> - if (!PageHead(page) || PageHuge(page) || !PageLRU(page))
> + if (!folio_test_large(folio)
> + || folio_test_hugetlb(folio)
> + || !folio_test_lru(folio))
> goto next;
That is a completely illegible way of indenting this code! There's
no visual cue when the condition stops and when the next statement
begins. Try one of these:
if (!folio_test_large(folio) ||
folio_test_hugetlb(folio) ||
!folio_test_lru(folio))
goto next;
if (!folio_test_large(folio) ||
folio_test_hugetlb(folio) ||
!folio_test_lru(folio))
goto next;
next prev parent reply other threads:[~2022-12-30 8:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-29 12:25 Kefeng Wang
2022-12-29 23:28 ` Andrew Morton
2022-12-30 1:36 ` Kefeng Wang
2022-12-30 8:14 ` Matthew Wilcox [this message]
2022-12-30 9:03 ` Kefeng Wang
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=Y66d6edbCgs6QgMj@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=wangkefeng.wang@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