archive mirror
 help / color / mirror / Atom feed
Cc:, chenqiwu <>
Subject: [PATCH] mm/page_alloc: use free_area_empty() instead of open-coding
Date: Sun,  8 Mar 2020 20:01:45 +0800	[thread overview]
Message-ID: <> (raw)

From: chenqiwu <>

Use free_area_empty() API to replace list_empty() for better
code readability.

Signed-off-by: chenqiwu <>
 mm/page_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 79e950d..6ae7142 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3534,7 +3534,7 @@ bool __zone_watermark_ok(struct zone *z, unsigned int order, unsigned long mark,
 		if (alloc_harder &&
-			!list_empty(&area->free_list[MIGRATE_HIGHATOMIC]))
+		    !free_area_empty(area, MIGRATE_HIGHATOMIC))
 			return true;
 	return false;

             reply	other threads:[~2020-03-08 12:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-08 12:01 qiwuchen55 [this message]
2020-03-08 12:29 ` [PATCH] mm/page_alloc: use free_area_empty() instead of open-coding Matthew Wilcox
2020-03-08 13:27   ` chenqiwu

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).