Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp907931pxb; Thu, 5 Nov 2020 16:54:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRfiojX8dKB4sYn8CmQs8IoE3UFIr9y5waoh6nrL/KZIx9wkerQg5dyuVrJDaynBl1CK9x X-Received: by 2002:a17:906:e53:: with SMTP id q19mr5303449eji.254.1604624082998; Thu, 05 Nov 2020 16:54:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604624082; cv=none; d=google.com; s=arc-20160816; b=Vk6DUoGrl3W5tdd7j+e+2KzxT50KTq+m1l953uwh89KlCuzoEpTVbQOt2Ialn7kkt6 w7otpBIQANnbD6Dgf/FXvp+txvi6d8kNpYB48G0VTgrI/3E5UkrJSXeTtS31Jx1YrojO rRx48IZlnVkzrARazyvwKVngyBJSEs489KlNygGslpN2RXVWBkfM37o3h8zQBqyiQ1yE DWZhFv/rdd7gxAmj3pkiWD/0GSkSnBenNUxzheepUBGo1dRXze57zWtGPBBB2mk+nNPh n60EydcUXjDRtA8PO4/zQUdIzyLQtk8uBGxKg+/zC+1b1z/hREId9asWu3sUMXWx6Pcg uQ/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=c83dvEU/mNjvQk5n1A2ZnS0Sp2WfXEWJ2edrH1gpMns=; b=tfv+XiqFzZwGtDjzXNtE8lpPTuMeArk1a2j7ZW6Tb/1W7benzOkJw4gncatmDae05C 1t0fNqzfd+DRSSaRkny+NFvSzAMQZgOGDvr7tAnBwZkaQRzGxHnZjYEHwgBeoDMr/dOV SackBd74V4P//d03bMKLP1A57on/HaMeldD3wTrgI7MaGcxTQILar4NS/v1tMgn6++t2 DnLTW9MxpvRr1tpQ4PcY4aTrXvj/9wAVpFLE17RoqXj4g4SBLcT66IcngnMQPt4TSzmS AEmRoAP/7Irah6I2g64+DZtyAmv1ZkMwHkInAf6VhmDmzqbOkhmH8YPMxXZI4QWkJGwa XAlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b="nYe9/jFx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i60si2504202edd.336.2020.11.05.16.54.20; Thu, 05 Nov 2020 16:54:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b="nYe9/jFx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732921AbgKFAwL (ORCPT + 99 others); Thu, 5 Nov 2020 19:52:11 -0500 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:9238 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732848AbgKFAwG (ORCPT ); Thu, 5 Nov 2020 19:52:06 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Thu, 05 Nov 2020 16:52:03 -0800 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 6 Nov 2020 00:51:59 +0000 Received: from rcampbell-dev.nvidia.com (10.124.1.5) by mail.nvidia.com (172.20.187.12) with Microsoft SMTP Server id 15.0.1473.3 via Frontend Transport; Fri, 6 Nov 2020 00:51:59 +0000 From: Ralph Campbell To: , , , CC: Jerome Glisse , John Hubbard , Alistair Popple , Christoph Hellwig , "Jason Gunthorpe" , Bharata B Rao , Zi Yan , "Kirill A . Shutemov" , Yang Shi , Ben Skeggs , Shuah Khan , Andrew Morton , Ralph Campbell Subject: [PATCH v3 2/6] mm/migrate: move migrate_vma_collect_skip() Date: Thu, 5 Nov 2020 16:51:43 -0800 Message-ID: <20201106005147.20113-3-rcampbell@nvidia.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201106005147.20113-1-rcampbell@nvidia.com> References: <20201106005147.20113-1-rcampbell@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public Content-Transfer-Encoding: quoted-printable Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1604623923; bh=c83dvEU/mNjvQk5n1A2ZnS0Sp2WfXEWJ2edrH1gpMns=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:X-NVConfidentiality: Content-Transfer-Encoding:Content-Type; b=nYe9/jFxdlLp29PUkK4HpOkntA6n5ED8ryHK5XbwUn+CnvdVFi/TVh2/u/bLVBTLT QOYpEEx2Mb0H+tLHRT0UoqvExGSDYi/x0rDMIunDuBVjDymLKY5oipbbtn/Z6BFbUR lUmWDwbu+iL4Ls29LM094GkxEqYGbyXY/eBX0+5RRKGRaFGKodTb+JqQ5bUaalXCDc cpFgmBKpp+wEmu6QjXCHeNdK0sEC3/Sbrhr7qf4hZqg1E4U8KZp7Pu9YVAdsAdxeCI x4FBmXyCayDbSdNxohCtD+QNdp4UcB9e1TYIwqxJRTgncr9+T56iuihU561CEYmQ+G 2su1h0YLDJ37A== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move the definition of migrate_vma_collect_skip() to make it callable by migrate_vma_collect_hole(). This helps make the next patch easier to read. Signed-off-by: Ralph Campbell --- mm/migrate.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index c1585ec29827..665516319b66 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -2253,6 +2253,21 @@ int migrate_misplaced_transhuge_page(struct mm_struc= t *mm, #endif /* CONFIG_NUMA */ =20 #ifdef CONFIG_DEVICE_PRIVATE +static int migrate_vma_collect_skip(unsigned long start, + unsigned long end, + struct mm_walk *walk) +{ + struct migrate_vma *migrate =3D walk->private; + unsigned long addr; + + for (addr =3D start; addr < end; addr +=3D PAGE_SIZE) { + migrate->dst[migrate->npages] =3D 0; + migrate->src[migrate->npages++] =3D 0; + } + + return 0; +} + static int migrate_vma_collect_hole(unsigned long start, unsigned long end, __always_unused int depth, @@ -2281,21 +2296,6 @@ static int migrate_vma_collect_hole(unsigned long st= art, return 0; } =20 -static int migrate_vma_collect_skip(unsigned long start, - unsigned long end, - struct mm_walk *walk) -{ - struct migrate_vma *migrate =3D walk->private; - unsigned long addr; - - for (addr =3D start; addr < end; addr +=3D PAGE_SIZE) { - migrate->dst[migrate->npages] =3D 0; - migrate->src[migrate->npages++] =3D 0; - } - - return 0; -} - static int migrate_vma_collect_pmd(pmd_t *pmdp, unsigned long start, unsigned long end, --=20 2.20.1