Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1924010ybe; Thu, 12 Sep 2019 01:31:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNZuxFth0ITdUMAvRWUEvCjbkDV6yX0aGV+oJc0rhh8UH3aj5ufBvfy/SgIInM7zIpWMQx X-Received: by 2002:a17:906:15c2:: with SMTP id l2mr6118357ejd.4.1568277119381; Thu, 12 Sep 2019 01:31:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568277119; cv=none; d=google.com; s=arc-20160816; b=GW9MYraM4lpw/fbTnvIXgyLq9Nk8hkShFs4AqvPUF905OclLeTTwUZZ47AUjSYPKFA EreAAojNmiZIkhM04sluoTc2RHM2kQ57Ax0+rLEM86xBm7GMSwa3CMIds1Rs3PSzgr6Q 36+oWyqVqZydP1ILFgLaguvp6F+Td5PnEErZ6KWdjMK5AsqzDjzgbt6mT1vY1YfNps4i FuHm48tF007dlLpNSLbo1gm7izLBGJaBKA+HREO+wJMziT2aMq1eLSdFFhkyNUe1sAfF o3gGU+Y2C0BN4mSCU5CORh7Mip9DCHUUx3JLtyOJsnOmRjlXI+i2OAMJZUvWOCFWsGWi /skg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=MEF+JdRv8Ob7h8xYKaky4tDRHx5LJQ2nRPyfYvJSp+w=; b=mX0x6yxsS20ARxboyRC5vcKwThlomHRJdR6sgjmQJGFlda2v4WMwpi336p9FP92hJu OxEHKoi9p8Tv9QJcQDzctIqapFPOAUufoI41pnrHep8c7945aSBUefMCa9oyXWpy8XXr KpAGWFLULxuLKieyKPx9G7cPP04JBIUOUPwiLJKCWkGYA7HQbyLIYezXPj4whQO2oAtB n6Vp9Su0xix4tAIn4zkiIHlOyghkoH9kdDjFHHPUoCpoZyDDl8rPF6upWGCaLhueV0dD N7hslGkD8nmBwNDP15mdWxt5mNHmZCPHjjZx2BcwannzrzCBw52zzNpHo+TYyykj2fSn svbQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y24si8942623ejb.344.2019.09.12.01.31.36; Thu, 12 Sep 2019 01:31:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730333AbfILI0R (ORCPT + 99 others); Thu, 12 Sep 2019 04:26:17 -0400 Received: from verein.lst.de ([213.95.11.211]:45327 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725765AbfILI0Q (ORCPT ); Thu, 12 Sep 2019 04:26:16 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 573D1227A81; Thu, 12 Sep 2019 10:26:13 +0200 (CEST) Date: Thu, 12 Sep 2019 10:26:13 +0200 From: Christoph Hellwig To: Ralph Campbell Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, =?iso-8859-1?B?Suly9G1l?= Glisse , Jason Gunthorpe , Andrew Morton , Christoph Hellwig Subject: Re: [PATCH 1/4] mm/hmm: make full use of walk_page_range() Message-ID: <20190912082613.GA14368@lst.de> References: <20190911222829.28874-1-rcampbell@nvidia.com> <20190911222829.28874-2-rcampbell@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190911222829.28874-2-rcampbell@nvidia.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +static int hmm_pfns_fill(unsigned long addr, > + unsigned long end, > + struct hmm_range *range, > + enum hmm_pfn_value_e value) Nit: can we use the space a little more efficient, e.g.: static int hmm_pfns_fill(unsigned long addr, unsigned long end, struct hmm_range *range, enum hmm_pfn_value_e value) > +static int hmm_vma_walk_test(unsigned long start, > + unsigned long end, > + struct mm_walk *walk) Same here. > + if (!(vma->vm_flags & VM_READ)) { > + (void) hmm_pfns_fill(start, end, range, HMM_PFN_NONE); There should be no need for the void cast here.