From patchwork Fri Sep 24 18:12:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harris Song X-Patchwork-Id: 12518109 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EA94C433F5 for ; Sun, 26 Sep 2021 08:36:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C522A60EE2 for ; Sun, 26 Sep 2021 08:36:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C522A60EE2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=inspur.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 121436B0071; Sun, 26 Sep 2021 04:36:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0D1EB6B0072; Sun, 26 Sep 2021 04:36:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F030C900002; Sun, 26 Sep 2021 04:36:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0240.hostedemail.com [216.40.44.240]) by kanga.kvack.org (Postfix) with ESMTP id E07D56B0071 for ; Sun, 26 Sep 2021 04:36:41 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id A86C42D242 for ; Sun, 26 Sep 2021 08:36:41 +0000 (UTC) X-FDA: 78629068602.29.C79CCFC Received: from unicom145.biz-email.net (unicom145.biz-email.net [210.51.26.145]) by imf12.hostedemail.com (Postfix) with ESMTP id 60B5910000A5 for ; Sun, 26 Sep 2021 08:36:40 +0000 (UTC) Received: from ([60.208.111.195]) by unicom145.biz-email.net ((LNX1044)) with ASMTP (SSL) id UJL00034; Sun, 26 Sep 2021 16:36:34 +0800 Received: from localhost.localdomain (10.200.104.119) by jtjnmail201608.home.langchao.com (10.100.2.8) with Microsoft SMTP Server id 15.1.2308.14; Sun, 26 Sep 2021 16:27:09 +0800 From: Kai Song To: CC: , , Kai Song Subject: [PATCH] mm/vmscan.c:Fix -Wunused-but-set-variable warning Date: Sat, 25 Sep 2021 02:12:18 +0800 Message-ID: <20210924181218.21165-1-songkai01@inspur.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Originating-IP: [10.200.104.119] tUid: 2021926163634ab3e599a17e05123bb24ebaaed18d147 X-Abuse-Reports-To: service@corp-email.com Abuse-Reports-To: service@corp-email.com X-Complaints-To: service@corp-email.com X-Report-Abuse-To: service@corp-email.com Authentication-Results: imf12.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf12.hostedemail.com: domain of songkai01@inspur.com designates 210.51.26.145 as permitted sender) smtp.mailfrom=songkai01@inspur.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 60B5910000A5 X-Stat-Signature: i3kz1pn6f5zz1h5ni4pwmq4ej1org1qk X-HE-Tag: 1632645400-398860 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: We fix the following warning when building kernel with W=1: mm/vmscan.c:1362:6: warning: variable 'err' set but not used [-Wunused-but-set-variable] Signed-off-by: Kai Song Reviewed-by: Yang Shi --- mm/vmscan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index f8b43f131673..7cf702bc1959 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1359,7 +1359,6 @@ static unsigned int demote_page_list(struct list_head *demote_pages, { int target_nid = next_demotion_node(pgdat->node_id); unsigned int nr_succeeded; - int err; if (list_empty(demote_pages)) return 0; @@ -1368,7 +1367,7 @@ static unsigned int demote_page_list(struct list_head *demote_pages, return 0; /* Demotion ignores all cpuset and mempolicy settings */ - err = migrate_pages(demote_pages, alloc_demote_page, NULL, + migrate_pages(demote_pages, alloc_demote_page, NULL, target_nid, MIGRATE_ASYNC, MR_DEMOTION, &nr_succeeded);