From patchwork Sun Mar 8 12:01:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chenqiwu X-Patchwork-Id: 11425611 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8F9BE14B7 for ; Sun, 8 Mar 2020 12:02:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 568262072A for ; Sun, 8 Mar 2020 12:02:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HgFU1jyb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 568262072A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6894F6B0005; Sun, 8 Mar 2020 08:02:00 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6385A6B0006; Sun, 8 Mar 2020 08:02:00 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 54E426B0007; Sun, 8 Mar 2020 08:02:00 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0174.hostedemail.com [216.40.44.174]) by kanga.kvack.org (Postfix) with ESMTP id 3C3C66B0005 for ; Sun, 8 Mar 2020 08:02:00 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 0B77C4DCD for ; Sun, 8 Mar 2020 12:02:00 +0000 (UTC) X-FDA: 76572056400.04.shame42_85d8b14d48708 X-Spam-Summary: 2,0,0,26afbeef8b47734d,d41d8cd98f00b204,qiwuchen55@gmail.com,,RULES_HIT:41:355:379:541:800:960:965:966:973:988:989:1260:1345:1534:1539:1567:1711:1714:1730:1747:1777:1792:2196:2198:2199:2200:2393:2559:2562:2731:3138:3139:3140:3141:3142:3867:4321:4385:4390:4395:5007:6261:6642:6653:7576:9413:10004:11026:11658:11914:12043:12297:12517:12519:12555:12679:12895:12986:13069:13311:13357:14181:14384:14394:14721:21080:21444:21451:21627:21666:21990:30012:30054,0,RBL:209.85.215.194:@gmail.com:.lbl8.mailshell.net-62.18.0.100 66.100.201.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: shame42_85d8b14d48708 X-Filterd-Recvd-Size: 3202 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Sun, 8 Mar 2020 12:01:59 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id z12so3420448pgl.4 for ; Sun, 08 Mar 2020 05:01:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=LmQlgC3I/wpPEMavqzk+8YwbHVCtyLWbHfZNVNauOTA=; b=HgFU1jybYc5HcJv9qTfWakjRXMoAMvjyjFCeL9Gcm37w0qT8aVqN6O4IA5lrpsx4At VOpDIiMMCITce7n9GqUVlJB7aBjbRPxFSvLk76CU5EDVYCUvQpbHypmGCKIS7EgryRDT LdSvO6p5RlyYtU9ajMK/uyX73mDpE2T78mG7avHfunlhSRdmtSUdnFvDKmhbeKwYq4NO IdM1NHtFqyPSMrgwIlIZ8TVxEA9cWexrr3PUhDk4L79Mpy2IQFGwPAnhG3Ww2ZttQYk+ oSQPEmGdnAE+/Dq/MEDjr1L9YimaQL54RpET3cW978jUx+9L26lzxMOnCyNSTEi2LXq+ oykQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=LmQlgC3I/wpPEMavqzk+8YwbHVCtyLWbHfZNVNauOTA=; b=sreqo7qOym2EbwZAyx1sTsKdcwizkiTXei5kWfrQflTvsb2DtEKZtYHjSwFiHPxp2G eubQ5fesK7Yuz4kBSVbfIlQTidbvEQZtGXJ8zYlm+UPTp7uTlvM4XS2Eok76cXmQ9Hvl x8Zv0UDwyilJMRkMNZfLLFgnbQMQSjeTsE73DSU2oJhZ466kOqgTUmCJasHG/ic2cvQD eSyHBnrisIx/DxM85prmmsR1QV/4V1PaVZvoCuYQJmTj3QFXLNCiUXHFd5zjivYURfjX pxD1REbXAe/FbN2vz7HW8RaXVE0gC319yADYCG7FkFmw4JmLlNk5nhAaEmnOYTOQI9S1 sC/A== X-Gm-Message-State: ANhLgQ3pa0Mt6SB7PZP4yR0p72o5ckYTIfJ5saoOwxXnNgZVkRksJZV0 NhgHjjx4Vsz7LxV5YAKrcIA= X-Google-Smtp-Source: ADFU+vs0W8TfZ1jwIidkXjmOpXhJIvs5ljz2w6juzlM5wLEa15sfyMHfoPgwdalGLSXA7T4NT66H4g== X-Received: by 2002:aa7:85c8:: with SMTP id z8mr12118089pfn.66.1583668918501; Sun, 08 Mar 2020 05:01:58 -0700 (PDT) Received: from localhost ([43.224.245.179]) by smtp.gmail.com with ESMTPSA id u1sm41738348pfn.133.2020.03.08.05.01.57 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sun, 08 Mar 2020 05:01:57 -0700 (PDT) From: qiwuchen55@gmail.com To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, chenqiwu Subject: [PATCH] mm/page_alloc: use free_area_empty() instead of open-coding Date: Sun, 8 Mar 2020 20:01:45 +0800 Message-Id: <1583668905-6569-1-git-send-email-qiwuchen55@gmail.com> X-Mailer: git-send-email 1.9.1 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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, } #endif if (alloc_harder && - !list_empty(&area->free_list[MIGRATE_HIGHATOMIC])) + !free_area_empty(area, MIGRATE_HIGHATOMIC)) return true; } return false;