From patchwork Fri Nov 5 20:42:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12605659 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 1EF62C433FE for ; Fri, 5 Nov 2021 20:42:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E338F6120D for ; Fri, 5 Nov 2021 20:42:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E338F6120D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 51FD194007C; Fri, 5 Nov 2021 16:42:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 481D4940090; Fri, 5 Nov 2021 16:42:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 300B894007C; Fri, 5 Nov 2021 16:42:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0025.hostedemail.com [216.40.44.25]) by kanga.kvack.org (Postfix) with ESMTP id 0F121940090 for ; Fri, 5 Nov 2021 16:42:24 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id C4C1775305 for ; Fri, 5 Nov 2021 20:42:23 +0000 (UTC) X-FDA: 78776049366.10.F245ABE Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf15.hostedemail.com (Postfix) with ESMTP id 8F7BDD0000A5 for ; Fri, 5 Nov 2021 20:42:12 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 8F6C361058; Fri, 5 Nov 2021 20:42:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1636144942; bh=jwJ8qn72re8tjT6QT5XHOWry11YP2w2kKC9FzKZOqp8=; h=Date:From:To:Subject:In-Reply-To:From; b=HqPYaWdyDG+C+B/8RyTo3Bs2P8mRqFZojHN6sgpfhFS/b07D6MnoZzD574hC1igty BTb5aCfvM0y0dhs9A/B0NxNgJhj+n7UZZmyGCN195ISmnbP6/EbpsQquFZ2YdsBYud gbvm6oVIsHcga5Vta2Xx+1dSLpggZ28OMd1PXL6w= Date: Fri, 05 Nov 2021 13:42:22 -0700 From: Andrew Morton To: akpm@linux-foundation.org, linux-mm@kvack.org, mm-commits@vger.kernel.org, shy828301@gmail.com, songkai01@inspur.com, torvalds@linux-foundation.org Subject: [patch 148/262] mm/vmscan.c: fix -Wunused-but-set-variable warning Message-ID: <20211105204222.LKDG_epUU%akpm@linux-foundation.org> In-Reply-To: <20211105133408.cccbb98b71a77d5e8430aba1@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=HqPYaWdy; dmarc=none; spf=pass (imf15.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 8F7BDD0000A5 X-Stat-Signature: ku81zb5mjiuh4d3p7peswhzxn96mxt6j X-HE-Tag: 1636144932-151792 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: Kai Song Subject: mm/vmscan.c: fix -Wunused-but-set-variable warning 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] Link: https://lkml.kernel.org/r/20210924181218.21165-1-songkai01@inspur.com Signed-off-by: Kai Song Reviewed-by: Yang Shi Signed-off-by: Andrew Morton --- mm/vmscan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/mm/vmscan.c~mm-vmscanc-fix-wunused-but-set-variable-warning +++ a/mm/vmscan.c @@ -1337,7 +1337,6 @@ static unsigned int demote_page_list(str { int target_nid = next_demotion_node(pgdat->node_id); unsigned int nr_succeeded; - int err; if (list_empty(demote_pages)) return 0; @@ -1346,7 +1345,7 @@ static unsigned int demote_page_list(str 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);