[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y66d6edbCgs6QgMj@casper.infradead.org>
Date: Fri, 30 Dec 2022 08:14:33 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Kefeng Wang <wangkefeng.wang@...wei.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: huge_memory: convert split_huge_pages_all() to use a
folio
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;
Powered by blists - more mailing lists